Added global support and startglobal script
This commit is contained in:
parent
8d7b77f665
commit
d8ed1b4173
3 changed files with 9 additions and 2 deletions
5
index.js
5
index.js
|
@ -40,7 +40,9 @@ function stopLoop(){
|
||||||
client.on("ready", () => {
|
client.on("ready", () => {
|
||||||
startLoop();
|
startLoop();
|
||||||
console.log("I'm alive");
|
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",
|
name: "ping",
|
||||||
description: "Am alive???"
|
description: "Am alive???"
|
||||||
|
@ -141,6 +143,7 @@ client.on("interactionCreate", (int) => {
|
||||||
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.");
|
||||||
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("You tried kicking without perms? You're sus");
|
||||||
var mem2 = int.guild.members.cache.get(int.options.getUser("user").id);
|
var mem2 = int.guild.members.cache.get(int.options.getUser("user").id);
|
||||||
|
|
2
start
2
start
|
@ -1,4 +1,4 @@
|
||||||
while [ true ]
|
while [ true ]
|
||||||
do
|
do
|
||||||
node .
|
node . 879081086817288264
|
||||||
done
|
done
|
||||||
|
|
4
startglobal
Normal file
4
startglobal
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
while [ true ]
|
||||||
|
do
|
||||||
|
node .
|
||||||
|
done
|
Loading…
Reference in a new issue