3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-25 18:25:03 +00:00

Merge branch 'ZeppelinBot:master' into master

This commit is contained in:
Ruby 2022-05-17 16:04:11 +04:00 committed by GitHub
commit 015a908128
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 6 deletions

View file

@ -164,7 +164,7 @@ export function getPluginConfigPreprocessor(
if (options.overrides) {
for (const override of options.overrides) {
const overrideConfigMergedWithBaseConfig = configUtils.mergeConfig(options.config, override.config || {});
const overrideConfigMergedWithBaseConfig = configUtils.mergeConfig(options.config || {}, override.config || {});
const decodedOverrideConfig = blueprint.configSchema
? decodeAndValidateStrict(blueprint.configSchema, overrideConfigMergedWithBaseConfig)
: overrideConfigMergedWithBaseConfig;

View file

@ -8,7 +8,7 @@ import moment from "moment-timezone";
import { isEligible } from "../functions/isEligible";
export const AddServerFromInviteCmd = botControlCmd({
trigger: ["add_server_from_invite", "allow_server_from_invite"],
trigger: ["add_server_from_invite", "allow_server_from_invite", "adv"],
permission: "can_add_server_from_invite",
signature: {

View file

@ -1,10 +1,10 @@
import { GuildPluginData } from "knub";
import { RemindersPluginType } from "../types";
import { Reminder } from "../../../data/entities/Reminder";
import { Snowflake, TextChannel } from "discord.js";
import { DiscordAPIError, HTTPError, Snowflake, TextChannel } from "discord.js";
import moment from "moment-timezone";
import { disableLinkPreviews } from "knub/dist/helpers";
import { DBDateFormat, SECONDS } from "../../../utils";
import { DBDateFormat, isDiscordHTTPError, SECONDS } from "../../../utils";
import humanizeDuration from "humanize-duration";
export async function postReminder(pluginData: GuildPluginData<RemindersPluginType>, reminder: Reminder) {
@ -31,10 +31,13 @@ export async function postReminder(pluginData: GuildPluginData<RemindersPluginTy
});
}
} catch (err) {
// If we were unable to post the reminder, we'll try again later
// tslint:disable-next-line:no-console
console.warn(`Error when posting reminder for ${reminder.user_id} in guild ${reminder.guild_id}: ${String(err)}`);
return;
if (err instanceof HTTPError && err.code >= 500) {
// If we get a server error, try again later
return;
}
}
}