aboutsummaryrefslogtreecommitdiff
path: root/src/commands/info/icon.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-14 21:22:09 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-07-14 21:22:09 -0400
commit53d2b18f7f73d5696fb7cd86d1c164a790dfdcc3 (patch)
treef95f23aad382879b35860d4d3be3642068fac8a2 /src/commands/info/icon.ts
parenteaaae08aeee1fa16a4e1ad0b26fceb42885bfcde (diff)
downloadtanzanite-53d2b18f7f73d5696fb7cd86d1c164a790dfdcc3.tar.gz
tanzanite-53d2b18f7f73d5696fb7cd86d1c164a790dfdcc3.tar.bz2
tanzanite-53d2b18f7f73d5696fb7cd86d1c164a790dfdcc3.zip
started moving over some other commands
Diffstat (limited to 'src/commands/info/icon.ts')
-rw-r--r--src/commands/info/icon.ts34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/commands/info/icon.ts b/src/commands/info/icon.ts
new file mode 100644
index 0000000..bd1cdf4
--- /dev/null
+++ b/src/commands/info/icon.ts
@@ -0,0 +1,34 @@
+import { MessageEmbed } from 'discord.js';
+import { BushCommand, BushMessage, BushSlashMessage } from '../../lib';
+
+export default class IconCommand extends BushCommand {
+ constructor() {
+ super('icon', {
+ aliases: ['icon', 'guildavatar', 'severicon', 'guildicon'],
+ category: 'info',
+ description: {
+ content: "A command to get the server's icon",
+ usage: 'icon',
+ examples: 'icon'
+ },
+ clientPermissions: ['SEND_MESSAGES', 'EMBED_LINKS'],
+ channel: 'guild',
+ slash: true
+ });
+ }
+
+ async exec(message: BushMessage | BushSlashMessage): Promise<void> {
+ const embed = new MessageEmbed()
+ .setTimestamp()
+ .setColor(this.client.util.colors.default)
+ .setImage(
+ message.guild?.iconURL({
+ size: 2048,
+ dynamic: true,
+ format: 'png'
+ })
+ )
+ .setTitle(message.guild.name);
+ await message.util.reply({ embeds: [embed] });
+ }
+}