aboutsummaryrefslogtreecommitdiff
path: root/src/commands/info/guildInfo.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-04-20 18:37:22 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-04-20 18:37:22 -0400
commitf01be2e3ce820e5737416180efa3e5852ece72c4 (patch)
treea972af929940173e4e2d9f843124a8dfb293bc90 /src/commands/info/guildInfo.ts
parentbcb3dc5fcd21f7626d4c5a8c009dca5658a4436b (diff)
downloadtanzanite-f01be2e3ce820e5737416180efa3e5852ece72c4.tar.gz
tanzanite-f01be2e3ce820e5737416180efa3e5852ece72c4.tar.bz2
tanzanite-f01be2e3ce820e5737416180efa3e5852ece72c4.zip
fix invite link, remove store channel, update to use builder methods, fix breaking changes
Diffstat (limited to 'src/commands/info/guildInfo.ts')
-rw-r--r--src/commands/info/guildInfo.ts16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/commands/info/guildInfo.ts b/src/commands/info/guildInfo.ts
index e026d1c..4049250 100644
--- a/src/commands/info/guildInfo.ts
+++ b/src/commands/info/guildInfo.ts
@@ -1,9 +1,9 @@
import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage, type OptionalArgType } from '#lib';
import assert from 'assert';
-import { GuildDefaultMessageNotifications, GuildExplicitContentFilter } from 'discord-api-types/v9';
+import { GuildDefaultMessageNotifications, GuildExplicitContentFilter } from 'discord-api-types/v10';
import {
ApplicationCommandOptionType,
- Embed,
+ EmbedBuilder,
Guild,
GuildMFALevel,
GuildPremiumTier,
@@ -64,7 +64,7 @@ export default class GuildInfoCommand extends BushCommand {
await guild.fetch();
}
- const guildInfoEmbed = new Embed().setTitle(guild.name).setColor(util.colors.default);
+ const guildInfoEmbed = new EmbedBuilder().setTitle(guild.name).setColor(util.colors.default);
if (guild.icon) guildInfoEmbed.setThumbnail(guild.iconURL({ size: 2048, extension: 'png' }));
await this.generateAboutField(guildInfoEmbed, guild);
@@ -78,7 +78,7 @@ export default class GuildInfoCommand extends BushCommand {
return await message.util.reply({ embeds: [guildInfoEmbed] });
}
- private generateDescription(embed: Embed, guild: Guild | GuildPreview) {
+ private generateDescription(embed: EmbedBuilder, guild: Guild | GuildPreview) {
const description: string[] = [];
const otherEmojis = client.consts.mappings.otherEmojis;
@@ -115,7 +115,7 @@ export default class GuildInfoCommand extends BushCommand {
embed.setDescription(`\u200B${/*zero width space*/ description.join(' ')}`);
}
- private async generateAboutField(embed: Embed, guild: Guild | GuildPreview) {
+ private async generateAboutField(embed: EmbedBuilder, guild: Guild | GuildPreview) {
const guildAbout = [];
if (guild instanceof Guild) {
@@ -158,12 +158,12 @@ export default class GuildInfoCommand extends BushCommand {
embed.addFields({ name: '» About', value: guildAbout.join('\n') });
}
- private generateStatsField(embed: Embed, guild: Guild | GuildPreview) {
+ private generateStatsField(embed: EmbedBuilder, guild: Guild | GuildPreview) {
if (!(guild instanceof Guild)) return;
const guildStats: string[] = [];
- const channelTypes = (['Text', 'Voice', 'News', 'Stage', 'Store', 'Category', 'Thread'] as const).map(
+ const channelTypes = (['Text', 'Voice', 'News', 'Stage', 'Category', 'Thread'] as const).map(
(type) =>
`${client.consts.mappings.otherEmojis[`Channel${type}`]} ${guild.channels.cache
.filter((channel) => channel[`is${type}`]())
@@ -194,7 +194,7 @@ export default class GuildInfoCommand extends BushCommand {
embed.addFields({ name: '» Stats', value: guildStats.join('\n') });
}
- private generateSecurityField(embed: Embed, guild: Guild | GuildPreview) {
+ private generateSecurityField(embed: EmbedBuilder, guild: Guild | GuildPreview) {
if (!(guild instanceof Guild)) return;
const guildSecurity: string[] = [];