aboutsummaryrefslogtreecommitdiff
path: root/src/lib/extensions/discord-akairo
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/extensions/discord-akairo')
-rw-r--r--src/lib/extensions/discord-akairo/BushClientUtil.ts8
-rw-r--r--src/lib/extensions/discord-akairo/BushCommand.ts4
2 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/extensions/discord-akairo/BushClientUtil.ts b/src/lib/extensions/discord-akairo/BushClientUtil.ts
index 563df3d..aea515a 100644
--- a/src/lib/extensions/discord-akairo/BushClientUtil.ts
+++ b/src/lib/extensions/discord-akairo/BushClientUtil.ts
@@ -823,7 +823,7 @@ export class BushClientUtil extends ClientUtil {
* @returns The missing permissions or null if none are missing.
*/
public clientGuildPermCheck(message: BushMessage | BushSlashMessage, permissions: bigint[]): PermissionsString[] | null {
- const missing = message.guild?.me?.permissions.missing(permissions) ?? [];
+ const missing = message.guild?.members.me?.permissions.missing(permissions) ?? [];
return missing.length ? missing : null;
}
@@ -845,11 +845,11 @@ export class BushClientUtil extends ClientUtil {
const sendPerm = message.channel!.isThread() ? 'SendMessages' : 'SendMessagesInThreads';
if (!message.inGuild()) return null;
- if (!message.guild.me!.permissionsIn(message.channel.id).has(sendPerm)) missing.push(sendPerm);
+ if (!message.guild.members.me!.permissionsIn(message.channel.id).has(sendPerm)) missing.push(sendPerm);
missing.push(
...(checkChannel
- ? message.guild!.me!.permissionsIn(message.channel!.id!).missing(permissions)
+ ? message.guild!.members.me!.permissionsIn(message.channel!.id!).missing(permissions)
: this.clientGuildPermCheck(message, permissions) ?? [])
);
@@ -995,7 +995,7 @@ export class BushClientUtil extends ClientUtil {
if (embed.author) embeds.at(0)?.setAuthor(embed.author);
if (embed.title) embeds.at(0)?.setTitle(embed.title);
if (embed.url) embeds.at(0)?.setURL(embed.url);
- if (embed.fields) embeds.at(-1)?.setFields(...embed.fields);
+ if (embed.fields) embeds.at(-1)?.setFields(embed.fields);
if (embed.thumbnail) embeds.at(-1)?.setThumbnail(embed.thumbnail.url);
if (embed.footer) embeds.at(-1)?.setFooter(embed.footer);
if (embed.image) embeds.at(-1)?.setImage(embed.image.url);
diff --git a/src/lib/extensions/discord-akairo/BushCommand.ts b/src/lib/extensions/discord-akairo/BushCommand.ts
index febe95a..958e451 100644
--- a/src/lib/extensions/discord-akairo/BushCommand.ts
+++ b/src/lib/extensions/discord-akairo/BushCommand.ts
@@ -46,7 +46,7 @@ import {
type SlashResolveType
} from 'discord-akairo';
import {
- type ApplicationCommandOptionChoice,
+ type ApplicationCommandOptionChoiceData,
type Collection,
type Invite,
type PermissionResolvable,
@@ -147,7 +147,7 @@ interface BaseBushArgumentOptions extends Omit<ArgumentOptions, 'type' | 'prompt
/**
* The choices of the option for the user to pick from
*/
- choices?: ApplicationCommandOptionChoice[];
+ choices?: ApplicationCommandOptionChoiceData[];
/**
* Whether the option is an autocomplete option