aboutsummaryrefslogtreecommitdiff
path: root/bot_discord.js
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2021-07-31 22:28:25 -0400
committerAndrew Lee <alee14498@protonmail.com>2021-07-31 22:28:25 -0400
commite4a3132e4b1a404b2ab6005b826b0e250e1b399b (patch)
tree4b189721d8f53efd3b436219584bc57b1e89978e /bot_discord.js
parent60cd96e366487b9a422ecc685b46a2b300c32be1 (diff)
downloadAleeBot-e4a3132e4b1a404b2ab6005b826b0e250e1b399b.tar.gz
AleeBot-e4a3132e4b1a404b2ab6005b826b0e250e1b399b.tar.bz2
AleeBot-e4a3132e4b1a404b2ab6005b826b0e250e1b399b.zip
Getting ready for adding slash commands
Diffstat (limited to 'bot_discord.js')
-rw-r--r--bot_discord.js17
1 files changed, 15 insertions, 2 deletions
diff --git a/bot_discord.js b/bot_discord.js
index 07ca5ca..6b292dd 100644
--- a/bot_discord.js
+++ b/bot_discord.js
@@ -251,7 +251,6 @@ client.on('ready', async () => {
setInterval(function() {
botPresence();
-
}, 200000);
if (readyEmbedMessage === true) {
const readyEmbed = new Discord.MessageEmbed()
@@ -419,7 +418,7 @@ dbl.on('error', (e) => {
});
client.on('messageCreate', async(msg) => {
-
+ if (!client.application?.owner) await client.application?.fetch();
if (msg.author.bot) return;
const prefixes = JSON.parse(fs.readFileSync('./storage/prefixes.json', 'utf8'));
@@ -463,6 +462,20 @@ client.on('messageCreate', async(msg) => {
}
}
});
+/*
+client.on('interactionCreate', async (interaction) => {
+ if (!interaction.isCommand()) return;
+
+ if (!client.commands.has(interaction.commandName)) return;
+
+ try {
+ await client.commands.get(interaction.commandName).execute(interaction);
+ } catch (error) {
+ console.error(error);
+ await interaction.reply({ content: 'There was an error while executing this command!', ephemeral: true });
+ }
+
+});*/
process.on('unhandledRejection', function(err, p) {
log('[X | UNCAUGHT PROMISE] ' + err.stack.red);