Fixed events, removed debug messages
This commit is contained in:
parent
74a8ae6e81
commit
1c0d97687c
2 changed files with 6 additions and 9 deletions
|
@ -25,7 +25,7 @@ module.exports = {
|
|||
option.setName('global')
|
||||
.setDescription('Should this event display on all servers?'))
|
||||
.addStringOption(option =>
|
||||
option.setName('special message')
|
||||
option.setName('message')
|
||||
.setDescription('Special message to send in event announcement')))
|
||||
.addSubcommand(subcommand =>
|
||||
subcommand.setName('delete')
|
||||
|
@ -54,17 +54,17 @@ module.exports = {
|
|||
subcommand.setName('name')
|
||||
.setDescription('Change name of an event')
|
||||
.addStringOption(option =>
|
||||
option.setName('new name')
|
||||
option.setName('name')
|
||||
.setDescription('New name of the event')
|
||||
.setRequired(true))
|
||||
.addIntegerOption(option => option.setName('id')
|
||||
.setDescription('Id of the even you want to change')
|
||||
.setRequired(true)))
|
||||
.addSubcommand(subcommand =>
|
||||
subcommand.setName('special message')
|
||||
subcommand.setName('message')
|
||||
.setDescription('Change special message of an event')
|
||||
.addStringOption(option =>
|
||||
option.setName('new message')
|
||||
option.setName('message')
|
||||
.setDescription('New special message')
|
||||
.setRequired(true))))
|
||||
.addSubcommand(subcommand =>
|
||||
|
@ -105,7 +105,7 @@ module.exports = {
|
|||
case 'name':
|
||||
await interaction.reply(await changeEventName(interaction));
|
||||
break;
|
||||
case 'special message':
|
||||
case 'message':
|
||||
await interaction.reply(await changeSpecialMessage(interaction));
|
||||
break;
|
||||
}
|
||||
|
@ -243,7 +243,7 @@ async function changeSpecialMessage(interaction) {
|
|||
try {
|
||||
await eModel.findOneAndUpdate(
|
||||
{ id: interaction.options.getInteger('id') },
|
||||
{ $set: { specialMessage: interaction.options.getString('special message') } },
|
||||
{ $set: { specialMessage: interaction.options.getString('message') } },
|
||||
);
|
||||
}
|
||||
catch {
|
||||
|
|
3
main.js
3
main.js
|
@ -70,9 +70,6 @@ client.once('ready', async () => {
|
|||
ping();
|
||||
});
|
||||
await dbConnect();
|
||||
|
||||
const a = require('./.debug.js');
|
||||
a();
|
||||
console.log('Running!');
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue