Chat Queue Persistence (#33)
* fix: workflow env * update: center title on readme * update: readme goals and format * add: icons in readme * fix: plus margin * update: environment variables in contr. * add: queue for chat history * add: set -e for workflow failure * update: version increment * fix: client null info * fix: shutoff issues
This commit is contained in:
@@ -29,12 +29,18 @@ export const Shutoff: SlashCommand = {
|
||||
const superUsers: string[] = JSON.parse(Keys.superUser.replace(/'/g, '"'))
|
||||
|
||||
// check if admin or false on shutdown
|
||||
if (interaction.user.tag in superUsers || !(!interaction.options.get('are-you-sure')?.value && interaction.user.tag in superUsers)) {
|
||||
if (interaction.user.tag !in superUsers) {
|
||||
interaction.reply({
|
||||
content: `Shutdown failed:\n\n${interaction.user.tag}, You do not have permission to shutoff **${client.user?.tag}**, otherwise, you just didn't want to.`,
|
||||
content: `Shutdown failed:\n\n${interaction.user.tag}, You do not have permission to shutoff **${client.user?.tag}**.`,
|
||||
ephemeral: true
|
||||
})
|
||||
return // stop from shutting down
|
||||
} else if (!interaction.options.get('are-you-sure')?.value) {
|
||||
interaction.reply({
|
||||
content: `Shutdown failed:\n\n${interaction.user.tag}, You didn't want to shutoff **${client.user?.tag}**.`,
|
||||
ephemeral: true
|
||||
})
|
||||
return
|
||||
}
|
||||
|
||||
interaction.reply({
|
||||
|
||||
Reference in New Issue
Block a user