This commit is contained in:
Erik 2022-07-24 16:49:09 +03:00
parent ec400cb86e
commit a77ee0f3d4
Signed by: Navy.gif
GPG Key ID: 811EC0CD80E7E5FB
4 changed files with 23 additions and 4 deletions

View File

@ -54,6 +54,15 @@ Configure bot settings for the server.
[COMMAND_MODERATION_HELP]
Configure moderation related settings.
[COMMAND_LOGGING_HELP]
Configure logging settings.
[COMMAND_UTILITY_HELP]
Configure utility settings.
[COMMAND_ADMINISTRATION_HELP]
Configure administrative settings.
// Import
[COMMAND_IMPORT_HELP]
Import configuration and data from old versions of the bot.

View File

@ -441,6 +441,9 @@ No changes have been made to the case.
**Length:** {time} ({inSeconds} seconds)
// Edit command
[COMMAND_EDIT_HELP]
Edit case data, such as reason, duration, points and expiration.
[COMMAND_EDIT_LONG]
Please respond with the new reason.
Timeout in {time} seconds

View File

@ -208,7 +208,7 @@ class DiscordClient extends Client {
async _setActivity() {
const activities = {
0: async () => {
2: async () => {
const result = await this.shard.broadcastEval((client) => client.guilds.cache.size).catch(() => null);
if (!result) return;
const guildCount = result.reduce((p, v) => p+v, 0);
@ -220,7 +220,7 @@ class DiscordClient extends Client {
const userCount = result.reduce((p, v) => p+v, 0);
this.user.setActivity(`${userCount} users`, { type: ActivityType.Listening });
},
2: async () => {
0: async () => {
this.user.setActivity("for /help", { type: ActivityType.Listening });
}
};

View File

@ -41,7 +41,8 @@ class ImportCommand extends SlashCommand {
description: 'Whether any existing logs should be overwritten by the imports. By default new ones are bumped',
type: 'BOOLEAN'
}]
}]
}],
clientPermissions: ['ManageWebhooks']
});
}
@ -139,7 +140,13 @@ class ImportCommand extends SlashCommand {
if (typeof webhook === 'string') {
const hooks = await guild.fetchWebhooks();
const hook = hooks.get(webhook);
if (hook) await guild.updateWebhook('messages', hook);
if (hook) {
const channel = await guild.resolveChannel(hook.channelId);
await hook.delete();
const newHook = await channel.createWebhook({ name: 'Galactic Bot message logs' });
await guild.updateWebhook('messages', newHook);
}
} else if (version === '3') {
delete webhook.feature;
await this.client.storageManager.mongodb.webhooks.updateOne({ feature: 'messages', guild: guild.id }, webhook);