@@ -1,26 +1,26 @@
|
||||
const fetch = require("axios");
|
||||
|
||||
async function getuuid(ign) {
|
||||
const mojangAPI = "https://api.mojang.com/users/profiles/minecraft/";
|
||||
const mojangAPI = "https://api.mojang.com/users/profiles/minecraft/"
|
||||
|
||||
try {
|
||||
const user = await fetch(mojangAPI + ign);
|
||||
return user.data.id;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
const user = await fetch(mojangAPI + ign)
|
||||
return user.data.id;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
async function getplayer(uuid) {
|
||||
const slothPixel = "https://api.slothpixel.me/api/players/";
|
||||
const slothPixel = "https://api.slothpixel.me/api/players/";
|
||||
|
||||
try {
|
||||
const player = await fetch(slothPixel + uuid);
|
||||
return player;
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
try {
|
||||
const player = await fetch(slothPixel + uuid)
|
||||
return player
|
||||
} catch (error) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = getuuid;
|
||||
module.exports = getplayer;
|
||||
module.exports = getuuid
|
||||
module.exports = getplayer
|
||||
@@ -1,11 +1,12 @@
|
||||
module.exports = {
|
||||
name: "limbo",
|
||||
description: "Sends bot to limbo.",
|
||||
type: "spawn",
|
||||
name: 'limbo',
|
||||
description: 'Sends bot to limbo.',
|
||||
type: 'spawn',
|
||||
|
||||
async execute() {
|
||||
const bot = require("../../index.js");
|
||||
async execute() {
|
||||
const bot = require ('../../index.js');
|
||||
|
||||
bot.chat("\u00a7");
|
||||
}
|
||||
};
|
||||
bot.chat("\u00a7")
|
||||
|
||||
}
|
||||
};
|
||||
@@ -1,27 +1,29 @@
|
||||
const client = require("../../index.js");
|
||||
const client = require('../../index.js');
|
||||
|
||||
module.exports = {
|
||||
name: "Guild chat relay",
|
||||
description: "Sends a message to the chat.",
|
||||
type: "message",
|
||||
name: 'Guild chat relay',
|
||||
description: 'Sends a message to the chat.',
|
||||
type: 'message',
|
||||
|
||||
async execute(jsonMsg) {
|
||||
const gcchannel = "1092569207918575687";
|
||||
async execute(jsonMsg) {
|
||||
|
||||
const msg = jsonMsg.getText();
|
||||
const annoyingMessages = [
|
||||
"You are currently APPEARING OFFLINE",
|
||||
"REMINDER: Your Online Status is currently set to Appear Offline",
|
||||
"You have 1 unclaimed achievement reward!",
|
||||
"Click here to view it!"
|
||||
];
|
||||
const gcchannel = "1092569207918575687"
|
||||
|
||||
if (annoyingMessages.includes(msg)) return;
|
||||
const msg = jsonMsg.getText();
|
||||
const annoyingMessages = [
|
||||
"You are currently APPEARING OFFLINE",
|
||||
"REMINDER: Your Online Status is currently set to Appear Offline",
|
||||
"You have 1 unclaimed achievement reward!",
|
||||
"Click here to view it!"
|
||||
]
|
||||
|
||||
console.log("[Chat message] " + msg);
|
||||
if (annoyingMessages.includes(msg)) return;
|
||||
|
||||
const channel = client.guild.channels.cache.get(gcchannel);
|
||||
console.log("[Chat message] " + msg);
|
||||
|
||||
channel.send(msg);
|
||||
}
|
||||
};
|
||||
const channel = client.guild.channels.cache.get(gcchannel);
|
||||
|
||||
channel.send(msg);
|
||||
|
||||
}
|
||||
};
|
||||
@@ -1,10 +1,10 @@
|
||||
module.exports = {
|
||||
name: "login",
|
||||
description: "Logs the bot in.",
|
||||
type: "login",
|
||||
name: 'login',
|
||||
description: 'Logs the bot in.',
|
||||
type: 'login',
|
||||
|
||||
async execute() {
|
||||
const bot = require("../../index.js");
|
||||
console.log("Logged in as " + bot.username + "!");
|
||||
}
|
||||
};
|
||||
async execute() {
|
||||
const bot = require ('../../index.js');
|
||||
console.log('Logged in as ' + bot.username + '!')
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user