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

Start move to configAccessibleObjects, exclude perm overrides from logs

configAccessibleObjects are used to guarantee backwards compatibility and consistency.
Perm overrides from our own plugins are ignored as to not spam logs through bot managed slowmode or companion channels
This commit is contained in:
Dark 2021-07-06 05:23:47 +02:00
parent 1c7e97c785
commit d24aea7c5c
28 changed files with 259 additions and 75 deletions

View file

@ -25,9 +25,6 @@ export const StarboardReactionAddEvt = starboardEvt({
}
}
// No self-votes!
if (msg.author.id === userId) return;
const member = await resolveMember(pluginData.client, pluginData.guild, userId);
if (!member || member.user.bot) return;
@ -61,7 +58,10 @@ export const StarboardReactionAddEvt = starboardEvt({
});
});
const selfStar = msg.author.id === userId;
for (const starboard of applicableStarboards) {
if (selfStar && !starboard.allow_selfstars) continue;
// Save reaction into the database
await pluginData.state.starboardReactions.createStarboardReaction(msg.id, userId).catch(noop);

View file

@ -9,6 +9,7 @@ const StarboardOpts = t.type({
channel_id: t.string,
stars_required: t.number,
star_emoji: tNullable(t.array(t.string)),
allow_selfstars: tNullable(t.boolean),
copy_full_embed: tNullable(t.boolean),
enabled: tNullable(t.boolean),
show_star_count: t.boolean,