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

More rework progress, remove all eris imports

This commit is contained in:
Dark 2021-06-01 02:05:55 +02:00
parent 8f7a6510eb
commit 52839cc9f3
No known key found for this signature in database
GPG key ID: 2CD6ACB6B0A87B8A
181 changed files with 352 additions and 343 deletions

View file

@ -21,7 +21,7 @@ export const AnyMessageTrigger = automodTrigger<AnyMessageResultType>()({
},
renderMatchInformation({ pluginData, contexts, matchResult }) {
const channel = pluginData.guild.channels.get(contexts[0].message!.channel_id);
const channel = pluginData.guild.channels.cache.get(contexts[0].message!.channel_id);
return `Matched message (\`${contexts[0].message!.id}\`) in ${
channel ? verboseChannelMention(channel) : "Unknown Channel"
}`;

View file

@ -73,7 +73,7 @@ export const MatchAttachmentTypeTrigger = automodTrigger<MatchResultType>()({
},
renderMatchInformation({ pluginData, contexts, matchResult }) {
const channel = pluginData.guild.channels.get(contexts[0].message!.channel_id)!;
const channel = pluginData.guild.channels.cache.get(contexts[0].message!.channel_id)!;
const prettyChannel = verboseChannelMention(channel);
return (

View file

@ -33,7 +33,7 @@ export const RoleAddedTrigger = automodTrigger<RoleAddedMatchResult>()({
},
renderMatchInformation({ matchResult, pluginData, contexts }) {
const role = pluginData.guild.roles.get(matchResult.extra.matchedRoleId);
const role = pluginData.guild.roles.cache.get(matchResult.extra.matchedRoleId);
const roleName = role?.name || "Unknown";
const member = contexts[0].member!;
const memberName = `**${member.user.username}#${member.user.discriminator}** (\`${member.id}\`)`;

View file

@ -33,7 +33,7 @@ export const RoleRemovedTrigger = automodTrigger<RoleAddedMatchResult>()({
},
renderMatchInformation({ matchResult, pluginData, contexts }) {
const role = pluginData.guild.roles.get(matchResult.extra.matchedRoleId);
const role = pluginData.guild.roles.cache.get(matchResult.extra.matchedRoleId);
const roleName = role?.name || "Unknown";
const member = contexts[0].member!;
const memberName = `**${member.user.username}#${member.user.discriminator}** (\`${member.id}\`)`;