message changes
This commit is contained in:
parent
06219ea226
commit
8e8104d7b3
1 changed files with 6 additions and 6 deletions
12
index.js
12
index.js
|
@ -153,7 +153,7 @@ client.on("interactionCreate", (int) => {
|
||||||
int.reply(`Yup, I'm alive (${client.ws.ping} ms)`);
|
int.reply(`Yup, I'm alive (${client.ws.ping} ms)`);
|
||||||
} else if(int.commandName == "activity"){
|
} else if(int.commandName == "activity"){
|
||||||
var devs = readJson("devs.json");
|
var devs = readJson("devs.json");
|
||||||
if(!devs.devlist.includes(int.user.id)) return int.reply("You shall not pass");
|
if(!devs.devlist.includes(int.user.id)) return int.reply(":x: Access denied");
|
||||||
if(int.options.getString("activity") !== null){
|
if(int.options.getString("activity") !== null){
|
||||||
stopLoop();
|
stopLoop();
|
||||||
client.user.setActivity(int.options.getString("activity"), {type: int.options.getString("type")});
|
client.user.setActivity(int.options.getString("activity"), {type: int.options.getString("type")});
|
||||||
|
@ -164,16 +164,16 @@ client.on("interactionCreate", (int) => {
|
||||||
}
|
}
|
||||||
} else if(int.commandName == "eval"){
|
} else if(int.commandName == "eval"){
|
||||||
var devs = readJson("devs.json");
|
var devs = readJson("devs.json");
|
||||||
if(!devs.devlist.includes(int.user.id)) return int.reply("You shall not pass");
|
if(!devs.devlist.includes(int.user.id)) return int.reply(":x: Access denied");
|
||||||
try{
|
try{
|
||||||
int.reply(new String(eval(int.options.getString("code"))).valueOf()).catch(e => {});
|
int.reply(new String(eval(int.options.getString("code"))).valueOf()).catch(e => {});
|
||||||
} catch(e){
|
} catch(e){
|
||||||
int.reply(e.stack).catch(e => {});
|
int.reply(e.stack).catch(e => {});
|
||||||
};
|
};
|
||||||
} else if(int.commandName == "kick"){
|
} else if(int.commandName == "kick"){
|
||||||
if(!int.guild) return int.reply("This command cannot be used outside a guild.");
|
if(!int.guild) return int.reply(":x: This command cannot be used outside a guild.");
|
||||||
var mem = int.guild.members.cache.get(int.user.id);
|
var mem = int.guild.members.cache.get(int.user.id);
|
||||||
if(!mem.permissions.has("KICK_MEMBERS")) return int.reply("You tried kicking without perms? You're sus");
|
if(!mem.permissions.has("KICK_MEMBERS")) return int.reply(":x: You do not have permissions to kick users.");
|
||||||
var mem2 = int.guild.members.cache.get(int.options.getUser("user").id);
|
var mem2 = int.guild.members.cache.get(int.options.getUser("user").id);
|
||||||
mem2.kick(int.options.getString("reason")).then(() => {
|
mem2.kick(int.options.getString("reason")).then(() => {
|
||||||
var reason = "No reason specified.";
|
var reason = "No reason specified.";
|
||||||
|
@ -183,9 +183,9 @@ client.on("interactionCreate", (int) => {
|
||||||
int.reply("An error occured with my code, please report this to " + Eco.tag + " or " + Helixu.tag + ": ```js\n" + e.stack + "```");
|
int.reply("An error occured with my code, please report this to " + Eco.tag + " or " + Helixu.tag + ": ```js\n" + e.stack + "```");
|
||||||
});
|
});
|
||||||
} else if(int.commandName == "ban"){
|
} else if(int.commandName == "ban"){
|
||||||
if(!int.guild) return int.reply("This command cannot be used outside a guild.");
|
if(!int.guild) return int.reply(":x: This command cannot be used outside a guild.");
|
||||||
var mem = int.guild.members.cache.get(int.user.id);
|
var mem = int.guild.members.cache.get(int.user.id);
|
||||||
if(!mem.permissions.has("BAN_MEMBERS")) return int.reply("You tried banning without perms? You're sus");
|
if(!mem.permissions.has("BAN_MEMBERS")) return int.reply(":x: You do not have the permissions to ban users.");
|
||||||
var mem2 = int.guild.members.cache.get(int.options.getUser("user").id);
|
var mem2 = int.guild.members.cache.get(int.options.getUser("user").id);
|
||||||
mem2.ban(int.options.getString("reason")).then(() => {
|
mem2.ban(int.options.getString("reason")).then(() => {
|
||||||
var reason = "No reason specified.";
|
var reason = "No reason specified.";
|
||||||
|
|
Loading…
Reference in a new issue