diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/commands/leveling/setLevel.ts | 2 | ||||
-rw-r--r-- | src/lib/extensions/discord-akairo/BushClientUtil.ts | 7 |
2 files changed, 2 insertions, 7 deletions
diff --git a/src/commands/leveling/setLevel.ts b/src/commands/leveling/setLevel.ts index 5eb97b7..108b5d2 100644 --- a/src/commands/leveling/setLevel.ts +++ b/src/commands/leveling/setLevel.ts @@ -67,7 +67,7 @@ export default class SetLevelCommand extends BushCommand { guild: message.guild.id } }); - await levelEntry.update({ xp: Level.convertLevelToXp(level) }); + await levelEntry.update({ xp: Level.convertLevelToXp(level), user: user.id, guild: message.guild.id }); return await message.util.send({ content: `Successfully set level of <@${ user.id diff --git a/src/lib/extensions/discord-akairo/BushClientUtil.ts b/src/lib/extensions/discord-akairo/BushClientUtil.ts index 27eeea4..1a13c13 100644 --- a/src/lib/extensions/discord-akairo/BushClientUtil.ts +++ b/src/lib/extensions/discord-akairo/BushClientUtil.ts @@ -964,12 +964,7 @@ export class BushClientUtil extends ClientUtil { interaction: CommandInteraction, responseOptions: BushSlashSendMessageType | BushSlashEditMessageType ): Promise<Message | APIMessage | undefined> { - let newResponseOptions: BushSlashSendMessageType | BushSlashEditMessageType = {}; - if (typeof responseOptions === 'string') { - newResponseOptions.content = responseOptions; - } else { - newResponseOptions = responseOptions; - } + const newResponseOptions = typeof responseOptions === 'string' ? { content: responseOptions } : responseOptions; if (interaction.replied || interaction.deferred) { // @ts-expect-error: stop being dumb delete newResponseOptions.ephemeral; // Cannot change a preexisting message to be ephemeral |