1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 00:10:58 -05:00

Compare commits

..

No commits in common. "abf6cad2386f80b2e84effa92c421236e78fb59c" and "b0d62efee0c8f34ec6992a88a5f08efea09c7f5f" have entirely different histories.

2 changed files with 3 additions and 4 deletions

View File

@ -9,7 +9,6 @@ export default {
const theirIdea = (await client.suggestion._content.findById(suggestionIDReply))?.idea;
const timeFormatting = client.moment().format('DD/MM/YY h:mm A');
const stateChanged = 'Suggestion state has been successfully updated and DM is sent.';
const dmFail = `Failed to send a DM to <@${userid}>, they possibly have it turned off or blocked me.\nSuggestion ID: **${suggestionIDReply}**`;
({
your: async()=>{
const wclient = new WClient;
@ -44,7 +43,7 @@ export default {
.setTitle('Your suggestion has been approved.')
.setDescription(`> **Your suggestion:**\n${theirIdea}\n> **Their message:**\n${replyInDM.length === null ? '*No message from them.*' : replyInDM}`)
.setFooter({text: `Timestamp: ${timeFormatting} | Suggestion ID: ${suggestionIDReply}`})
]}).catch((err:Discord.DiscordjsErrorCodes)=>{if (err) return (client.channels.resolve('1040018521746325586') as Discord.TextChannel).send(dmFail)});
]});
await client.suggestion._content.findByIdAndUpdate(suggestionIDReply, {state: 'Approved'});
return interaction.reply({embeds:[new client.embed().setColor(client.config.embedColorGreen).setTitle(`Suggestion approved | ${suggestionIDReply}`).setDescription(stateChanged)]});
},
@ -59,7 +58,7 @@ export default {
.setTitle('Your suggestion has been rejected.')
.setDescription(`> **Your suggestion:**\n${theirIdea}\n> **Their message:**\n${replyInDM.length === null ? '*No message from them.*' : replyInDM}`)
.setFooter({text: `Timestamp: ${timeFormatting} | Suggestion ID: ${suggestionIDReply}`})
]}).catch((err:Discord.DiscordjsErrorCodes)=>{if (err) return (client.channels.resolve('1040018521746325586') as Discord.TextChannel).send(dmFail)});
]});
await client.suggestion._content.findByIdAndUpdate(suggestionIDReply, {state: 'Rejected'});
return interaction.reply({embeds:[new client.embed().setColor(client.config.embedColorRed).setTitle(`Suggestion rejected | ${suggestionIDReply}`).setDescription(stateChanged)]});
}

View File

@ -70,7 +70,7 @@ export default {
const incomingArrays = {
morning: ['good morning all', 'good morning everyone', 'good morning lads', 'morning all', 'morning everyone', 'morning lads', 'morning guys', 'good morning everybody'],
afternoon: ['good afternoon', 'afternoon all', 'afternoon everyone'],
evening: ['good evening', 'evening all', 'evening everyone', 'evening lads'],
evening: ['good evening', 'evening all', 'evening everyone'],
night: ['night all', 'night everyone', 'night guys', 'goodnight', 'good night'],
password: ['whats the password', 'what\'s the password', 'password pls'],
cantRead: ['i cant read', 'i can\'t read', 'cant read', 'can\'t read'],