From 647909639bf658ca049c7dfa9636785482325cc1 Mon Sep 17 00:00:00 2001 From: Miguel <79668469+TheMegaGlitch@users.noreply.github.com> Date: Sun, 4 Apr 2021 20:32:51 -0500 Subject: [PATCH] Added bot initials in slash commands to make it easier to find them and to prevent conflict beetween bots having similar commands. Minor fixes and improvements --- eventHandler.js | 2 +- interactions/{create.js => sn_create.js} | 0 interactions/{delete.js => sn_delete.js} | 0 interactions/{help.js => sn_help.js} | 0 interactions/{list.js => sn_list.js} | 0 interactions/{post.js => sn_post.js} | 0 interactions/{view.js => sn_view.js} | 0 modules/interactionHandler.js | 12 ++++++------ setup/index.js | 24 ++++++++++++------------ 9 files changed, 19 insertions(+), 19 deletions(-) rename interactions/{create.js => sn_create.js} (100%) rename interactions/{delete.js => sn_delete.js} (100%) rename interactions/{help.js => sn_help.js} (100%) rename interactions/{list.js => sn_list.js} (100%) rename interactions/{post.js => sn_post.js} (100%) rename interactions/{view.js => sn_view.js} (100%) diff --git a/eventHandler.js b/eventHandler.js index 89970d9..d8341c3 100644 --- a/eventHandler.js +++ b/eventHandler.js @@ -10,7 +10,7 @@ module.exports = function(client, instance){ client.on("ready", () => { console.log(`Client ${client.user.tag} (${client.user.id}) READY | Instance ${instance}`) function setStatus(){ - client.user.setActivity(`Taking notes via Slash Commands | ${client.guilds.cache.size} ${client.guilds.cache.size == 1?"Server":"Servers"} | /help`) + client.user.setActivity(`users taking notes via Slash Commands | ${client.guilds.cache.size} ${client.guilds.cache.size == 1?"Server":"Servers"} | /help`, {type:"WATCHING"}) } setStatus() setInterval(() => { diff --git a/interactions/create.js b/interactions/sn_create.js similarity index 100% rename from interactions/create.js rename to interactions/sn_create.js diff --git a/interactions/delete.js b/interactions/sn_delete.js similarity index 100% rename from interactions/delete.js rename to interactions/sn_delete.js diff --git a/interactions/help.js b/interactions/sn_help.js similarity index 100% rename from interactions/help.js rename to interactions/sn_help.js diff --git a/interactions/list.js b/interactions/sn_list.js similarity index 100% rename from interactions/list.js rename to interactions/sn_list.js diff --git a/interactions/post.js b/interactions/sn_post.js similarity index 100% rename from interactions/post.js rename to interactions/sn_post.js diff --git a/interactions/view.js b/interactions/sn_view.js similarity index 100% rename from interactions/view.js rename to interactions/sn_view.js diff --git a/modules/interactionHandler.js b/modules/interactionHandler.js index cdd03cd..6dcda0c 100644 --- a/modules/interactionHandler.js +++ b/modules/interactionHandler.js @@ -85,12 +85,12 @@ let cooldowns = new Map() const config = require("../config.json") const commandIDs = { - create:config.create, - view:config.view, - delete:config.delete, - list:config.list, - help:config.help, - post:config.post + sn_create:config.sn_create, + sn_view:config.sn_view, + sn_delete:config.sn_delete, + sn_list:config.sn_list, + sn_help:config.sn_help, + sn_post:config.sn_post } const guildNoteHandler = require("./guildNotesHandler") diff --git a/setup/index.js b/setup/index.js index 9dea28e..800c927 100644 --- a/setup/index.js +++ b/setup/index.js @@ -2,8 +2,8 @@ const {writeFileSync, existsSync} = require("fs") const Interaction = require("./modules/interactions") const commands = [ { - name: 'create', - description: 'SlashNotes: Create a note.', + name: 'sn_create', + description: 'Create a note.', options: [ { type: 3, @@ -26,8 +26,8 @@ const commands = [ ] }, { - name: 'view', - description: 'SlashNotes: View a note you own. (Does not work for Server Slash notes)', + name: 'sn_view', + description: 'View a note you own. (Does not work for Server Slash notes)', options: [ { type: 3, @@ -38,8 +38,8 @@ const commands = [ ] }, { - name: 'delete', - description: 'SlashNotes: Delete a note using its name.', + name: 'sn_delete', + description: 'Delete a note using its name.', options: [ { type: 3, @@ -56,12 +56,12 @@ const commands = [ ] }, { - name: 'list', - description: 'SlashNotes: View notes you own. (Does not work for Server Slash notes)', + name: 'sn_list', + description: 'View notes you own. (Does not work for Server Slash notes)', }, { - name: 'help', - description: 'SlashNotes: View all available commands or view information on a certain one.', + name: 'sn_help', + description: 'View all available commands or view information on a certain one.', options: [ { type: 3, @@ -71,8 +71,8 @@ const commands = [ ] }, { - name: 'post', - description: 'SlashNotes: Share a note you own in the current channel. (Does not work for Server Slash notes)', + name: 'sn_post', + description: 'Share a note you own in the current channel. (Does not work for Server Slash notes)', options: [ { type: 3,