You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if(!command)return;//message.reply(`${args[0]} is not a valid command!`); //uncomment if you want that the bot replies when the command is not a valid command!
10
-
command.execute(message,args,client);
11
-
}else{
12
-
// Here you can add commands that are not have a prefix.
if(!command)return;//message.reply(`${args[0]} is not a valid command!`); //uncomment if you want that the bot replies when the command is not a valid command!
26
+
command.execute(message,args,client);
27
+
}else{
28
+
// Here you can add commands that are not have a prefix.
29
+
// like when somebody pings the bot.
30
+
}
31
+
}catch(error){
32
+
console.log(error);
14
33
}
15
34
}
16
-
};
35
+
};
36
+
37
+
asyncfunctiongetPrefix(guildid){
38
+
letrows=awaitdbquery(`SELECT prefix FROM guilds WHERE guildid = ${guildid}`);
39
+
if(rows.length<1){
40
+
awaitdbquery(`INSERT IGNORE INTO guilds (id, guildid) VALUES (NULL, '${guildid}')`);
41
+
return'!';
42
+
}
43
+
if(rows[0].prefix==null){
44
+
awaitdbquery(`UPDATE guilds SET prefix = '!' WHERE guildid = ${guildid}`);
0 commit comments