-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#patch persistent messages update every 10 mins, cleaned up structure…
…/formatting
- Loading branch information
Showing
11 changed files
with
155 additions
and
151 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,8 @@ | ||
import {CommandInteraction, EmbedBuilder, ColorResolvable} from 'discord.js'; | ||
import {getAllPlanets} from '../api-wrapper'; | ||
import {FOOTER_MESSAGE, EMBED_COLOUR} from '../commands/_components'; | ||
|
||
export function sleep(ms: number) { | ||
return new Promise(resolve => { | ||
setTimeout(resolve, ms); | ||
}); | ||
} | ||
|
||
export function missingChannelPerms(interaction: CommandInteraction) { | ||
return { | ||
embeds: [ | ||
new EmbedBuilder() | ||
.setAuthor({ | ||
name: interaction.user.tag, | ||
iconURL: interaction.user.avatarURL() || undefined, | ||
}) | ||
.setTitle(`Permission Denied`) | ||
.setDescription( | ||
'This command creates a public, persistent message. To avoid inconviencing other users, it requires moderator permissions. ' | ||
) | ||
.setFooter({text: FOOTER_MESSAGE}) | ||
.setColor(EMBED_COLOUR as ColorResolvable) | ||
.setTimestamp(), | ||
], | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.