aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/commands/config/config.ts3
-rw-r--r--src/commands/config/features.ts1
-rw-r--r--src/listeners/message/directMessage.ts5
-rw-r--r--src/listeners/message/level.ts3
4 files changed, 6 insertions, 6 deletions
diff --git a/src/commands/config/config.ts b/src/commands/config/config.ts
index dc31b5b..ac3198b 100644
--- a/src/commands/config/config.ts
+++ b/src/commands/config/config.ts
@@ -106,8 +106,7 @@ export default class SettingsCommand extends BushCommand {
}),
channel: 'guild',
clientPermissions: ['SEND_MESSAGES'],
- userPermissions: ['SEND_MESSAGES', 'MANAGE_GUILD'],
- ownerOnly: true
+ userPermissions: ['SEND_MESSAGES', 'MANAGE_GUILD']
});
}
diff --git a/src/commands/config/features.ts b/src/commands/config/features.ts
index 2169177..8010ab9 100644
--- a/src/commands/config/features.ts
+++ b/src/commands/config/features.ts
@@ -17,6 +17,7 @@ export default class FeaturesCommand extends BushCommand {
userPermissions: ['SEND_MESSAGES', 'MANAGE_GUILD']
});
}
+
public override async exec(message: BushMessage | BushSlashMessage): Promise<unknown> {
if (!message.guild) return await message.util.reply(`${util.emojis.error} This command can only be used in servers.`);
diff --git a/src/listeners/message/directMessage.ts b/src/listeners/message/directMessage.ts
index 93ab662..5da55ec 100644
--- a/src/listeners/message/directMessage.ts
+++ b/src/listeners/message/directMessage.ts
@@ -14,7 +14,7 @@ export default class DirectMessageListener extends BushListener {
public override async exec(...[message]: BushClientEvents['messageCreate']): Promise<void> {
if (message.channel.type === 'DM') {
if (!(message.author.id == client.user!.id) && message.author.bot) return;
- const dmLogEmbed = new MessageEmbed().setTimestamp().setFooter(`User ID • ${message.author.id}`);
+ const dmLogEmbed = new MessageEmbed().setTimestamp().setFooter(`User ID • ${message.channel.recipient.id}`);
if (message.author.id != client.user!.id) {
dmLogEmbed
@@ -29,8 +29,7 @@ export default class DirectMessageListener extends BushListener {
)
.setDescription(`**DM:**\n${message}`)
.setColor(util.colors.red)
- .setTimestamp()
- .setFooter(`ID • ${message.author.id}`);
+ .setTimestamp();
}
if (message.attachments.filter((a) => typeof a.size == 'number').size == 1) {
dmLogEmbed.setImage(message.attachments.filter((a) => typeof a.size == 'number').first()!.proxyURL);
diff --git a/src/listeners/message/level.ts b/src/listeners/message/level.ts
index e567932..7004d52 100644
--- a/src/listeners/message/level.ts
+++ b/src/listeners/message/level.ts
@@ -29,7 +29,8 @@ export default class LevelListener extends BushListener {
}
});
const xpToGive = Level.genRandomizedXp();
- const success = await user.increment('xp', { by: xpToGive }).catch((e) => {
+ user.xp = user.xp + xpToGive;
+ const success = await user.save().catch((e) => {
void util.handleError('level', e);
return false;
});