mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-06-07 16:05:01 +00:00
Added Discord attachment link reaction, fixed emoji configuration and moved util functions
This commit is contained in:
parent
a4c4b17a14
commit
592d037148
173 changed files with 1540 additions and 1170 deletions
|
@ -203,7 +203,7 @@ if (env.DEBUG) {
|
|||
}
|
||||
|
||||
logger.info("Connecting to database");
|
||||
connect().then(async (connection) => {
|
||||
connect().then(async () => {
|
||||
const client = new Client({
|
||||
partials: [Partials.User, Partials.Channel, Partials.GuildMember, Partials.Message, Partials.Reaction],
|
||||
|
||||
|
@ -315,9 +315,27 @@ connect().then(async (connection) => {
|
|||
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