Added global support and startglobal script

This commit is contained in:
Ecolipsy 2021-11-23 18:41:11 +01:00
parent 8d7b77f665
commit d8ed1b4173
3 changed files with 9 additions and 2 deletions

View file

@ -40,7 +40,9 @@ function stopLoop(){
client.on("ready", () => {
startLoop();
console.log("I'm alive");
client.guilds.cache.get("879081086817288264").commands.set([
var obj = client.application.commands;
if(process.argv[2]) obj = client.guilds.cache.get("879081086817288264").commands;
obj.set([
{
name: "ping",
description: "Am alive???"
@ -141,6 +143,7 @@ client.on("interactionCreate", (int) => {
int.reply(e.stack).catch(e => {});
};
} else if(int.commandName == "kick"){
if(!int.guild) return int.reply("This command cannot be used outside a guild.");
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");
var mem2 = int.guild.members.cache.get(int.options.getUser("user").id);

2
start
View file

@ -1,4 +1,4 @@
while [ true ]
do
node .
node . 879081086817288264
done

4
startglobal Normal file
View file

@ -0,0 +1,4 @@
while [ true ]
do
node .
done