mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-06-07 16:05:01 +00:00
Merge branch '240811_application_commands_merge_2' into next
This commit is contained in:
commit
43b8017985
279 changed files with 6192 additions and 3044 deletions
|
@ -44,15 +44,7 @@ import { availableGlobalPlugins, availableGuildPlugins } from "./plugins/availab
|
|||
import { setProfiler } from "./profiler.js";
|
||||
import { logRateLimit } from "./rateLimitStats.js";
|
||||
import { startUptimeCounter } from "./uptime.js";
|
||||
import {
|
||||
MINUTES,
|
||||
SECONDS,
|
||||
errorMessage,
|
||||
isDiscordAPIError,
|
||||
isDiscordHTTPError,
|
||||
sleep,
|
||||
successMessage,
|
||||
} from "./utils.js";
|
||||
import { MINUTES, SECONDS, errorMessage, isDiscordAPIError, isDiscordHTTPError, sleep, successMessage } from "./utils.js";
|
||||
import { DecayingCounter } from "./utils/DecayingCounter.js";
|
||||
import { enableProfiling } from "./utils/easyProfiler.js";
|
||||
import { loadYamlSafely } from "./utils/loadYamlSafely.js";
|
||||
|
@ -324,9 +316,27 @@ connect().then(async () => {
|
|||
if (row) {
|
||||
try {
|
||||
const loaded = loadYamlSafely(row.config);
|
||||
|
||||
if (loaded.success_emoji || loaded.error_emoji) {
|
||||
const deprecatedKeys = [] as string[];
|
||||
const exampleConfig = `plugins:\n common:\n config:\n success_emoji: "👍"\n error_emoji: "👎"`;
|
||||
|
||||
if (loaded.success_emoji) {
|
||||
deprecatedKeys.push("success_emoji");
|
||||
}
|
||||
|
||||
if (loaded.error_emoji) {
|
||||
deprecatedKeys.push("error_emoji");
|
||||
}
|
||||
|
||||
logger.warn(`Deprecated config properties found in "${key}": ${deprecatedKeys.join(", ")}`);
|
||||
logger.warn(`You can now configure those emojis in the "common" plugin config\n${exampleConfig}`);
|
||||
}
|
||||
|
||||
// Remove deprecated properties some may still have in their config
|
||||
delete loaded.success_emoji;
|
||||
delete loaded.error_emoji;
|
||||
|
||||
return loaded;
|
||||
} catch (err) {
|
||||
logger.error(`Error while loading config "${key}": ${err.message}`);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue