diff options
Diffstat (limited to 'src/commands/info/inviteInfo.ts')
-rw-r--r-- | src/commands/info/inviteInfo.ts | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/commands/info/inviteInfo.ts b/src/commands/info/inviteInfo.ts index bfe7eae..5df86ad 100644 --- a/src/commands/info/inviteInfo.ts +++ b/src/commands/info/inviteInfo.ts @@ -28,15 +28,15 @@ export default class InviteInfoCommand extends BushCommand { public override async exec(message: CommandMessage | SlashMessage, args: { invite: ArgType<'invite' | 'string'> }) { const invite = message.util.isSlashMessage(message) ? ((await Arg.cast('invite', message, args.invite as string)) as ArgType<'invite'>) - : args.invite; + : (args.invite as Invite); - const inviteInfoEmbed = new EmbedBuilder().setTitle(`Invite to ${invite.guild.name}`).setColor(colors.default); + const inviteInfoEmbed = new EmbedBuilder().setTitle(`Invite to ${invite.guild!.name}`).setColor(colors.default); this.generateAboutField(inviteInfoEmbed, invite); } private generateAboutField(embed: EmbedBuilder, invite: Invite) { - const about = [`**code:** ${invite.code}`, `**channel:** ${}`]; + const about = [`**code:** ${invite.code}`, `**channel:** ${invite.channel!.name}`]; embed.addFields({ name: 'ยป About', value: about.join('\n') }); } |