MCPcopy Index your code
hub / github.com/RTByte/rtbyte / send

Method send

src/lib/structures/ModEmbed.js:59–76  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

57 }
58
59 async send() {
60 if (this.modCase.guild.settings.get(`logs.moderation.${[this.modCase.type]}`)) {
61 const logChannel = this.modCase.guild.channels.cache.get(this.modCase.guild.settings.get('channels.log'));
62 if (logChannel) await logChannel.send('', { disableEveryone: true, embed: this });
63 }
64
65 if (!this.modCase.guild.settings.get('moderation.notifyUser')) return null;
66 if (this.modCase.type === 'unban') return null;
67 if (this.modCase.silent) return null;
68 if (!this.client.users.cache.has(this.modCase.user.id)) return null;
69 if (this.modCase.user.id === this.client.user.id) return null;
70 if (this.modCase.user.bot || this.modCase.user.system) return null;
71 this.modCase.user.createDM().then((dm) => dm.send(this.modCase.moderator ? this.modCase.moderator.id === this.client.user.id ?
72 this.modCase.guild.language.get('MODERATION_LOG_BOILERPLATE_AUTO', this.modCase.guild) :
73 this.modCase.guild.language.get('MODERATION_LOG_BOILERPLATE', this.modCase.guild) : '', { disableEveryone: true, embed: this }).catch((err) => err));
74
75 return true;
76 }
77
78}
79

Callers 15

commandRunLogMethod · 0.80
dmCommandLogMethod · 0.80
showMethod · 0.80
showMethod · 0.80
showMethod · 0.80
showMethod · 0.80
showMethod · 0.80
showMethod · 0.80
showMethod · 0.80
showMethod · 0.80
showMethod · 0.80
runMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected