blob: cd4778a2ec599d1336ff1493219c7cf4d41cb2b0 [file] [log] [blame]
PineaFan752af462022-12-31 21:59:38 +00001import type { NucleusClient } from "../utils/client.js";
Skyler Grey11236ba2022-08-08 21:13:33 +01002import { LinkCheck, MalwareCheck, NSFWCheck, SizeCheck, TestString, TestImage } from "../reflex/scanners.js";
pineafan63fc5e22022-08-04 22:04:10 +01003import logAttachment from "../premium/attachmentLogs.js";
PineaFan0d06edc2023-01-17 22:10:31 +00004import { messageException } from "../utils/createTemporaryStorage.js";
pineafan63fc5e22022-08-04 22:04:10 +01005import getEmojiByName from "../utils/getEmojiByName.js";
6import client from "../utils/client.js";
pineafan0f5cc782022-08-12 21:55:42 +01007import { callback as statsChannelUpdate } from "../reflex/statsChannelUpdate.js";
TheCodedProfc7e8ef12023-04-22 22:28:11 -04008import { ChannelType, GuildMember, Message, ThreadChannel } from "discord.js";
TheCodedProfb7a7b992023-03-05 16:11:59 -05009import singleNotify from "../utils/singleNotify.js";
pineafan813bdf42022-07-24 10:39:10 +010010
pineafan63fc5e22022-08-04 22:04:10 +010011export const event = "messageCreate";
pineafan813bdf42022-07-24 10:39:10 +010012
TheCodedProfc7e8ef12023-04-22 22:28:11 -040013function checkUserForExceptions(user: GuildMember, exceptions: { roles: string[]; users: string[] }) {
14 if (exceptions.users.includes(user.id)) return true;
15 for (const role of user.roles.cache.values()) {
16 if (exceptions.roles.includes(role.id)) return true;
17 }
18 return false;
19}
20
PineaFan752af462022-12-31 21:59:38 +000021export async function callback(_client: NucleusClient, message: Message) {
Skyler Grey75ea9172022-08-06 10:22:23 +010022 if (!message.guild) return;
PineappleFan13892c62023-03-05 07:00:07 +000023 const config = await client.memory.readGuildInfo(message.guild.id);
Skyler9f5fca82023-03-05 09:12:03 +000024
Skyler Greyda16adf2023-03-05 10:22:12 +000025 if (
26 config.autoPublish.enabled &&
27 config.autoPublish.channels.includes(message.channel.id) &&
28 message.channel.type === ChannelType.GuildAnnouncement &&
29 message.reference === null
Skyler9f5fca82023-03-05 09:12:03 +000030 ) {
Skyler Grey67691762023-03-06 09:58:19 +000031 if (message.channel.permissionsFor(message.guild.members.me!)!.has("ManageMessages")) {
TheCodedProfb7a7b992023-03-05 16:11:59 -050032 await message.crosspost();
33 } else {
Skyler Greyf4f21c42023-03-08 14:36:29 +000034 await singleNotify(
pineafan719d2e22023-05-29 12:21:21 +010035 "crosspost.noManageMessages",
Skyler Greyf4f21c42023-03-08 14:36:29 +000036 message.guild.id,
pineafan719d2e22023-05-29 12:21:21 +010037 `Nucleus does not have Manage Messages in <#${message.channel.id}>`,
38 "Warning"
Skyler Greyf4f21c42023-03-08 14:36:29 +000039 );
TheCodedProfb7a7b992023-03-05 16:11:59 -050040 }
PineappleFan13892c62023-03-05 07:00:07 +000041 }
42
pineafan63fc5e22022-08-04 22:04:10 +010043 if (message.author.bot) return;
PineaFan538d3752023-01-12 21:48:23 +000044 if (message.channel.isDMBased()) return;
Skyler Grey75ea9172022-08-06 10:22:23 +010045 try {
pineafan6de4da52023-03-07 20:43:44 +000046 await statsChannelUpdate((await message.guild.members.fetch(message.author.id)).user, message.guild);
Skyler Grey75ea9172022-08-06 10:22:23 +010047 } catch (e) {
48 console.log(e);
49 }
pineafan813bdf42022-07-24 10:39:10 +010050
TheCodedProf6ec331b2023-02-20 12:13:06 -050051 const { log, isLogging, NucleusColors, entry, renderUser, renderDelta, renderChannel } = client.logger;
pineafan813bdf42022-07-24 10:39:10 +010052
pineafan63fc5e22022-08-04 22:04:10 +010053 const fileNames = await logAttachment(message);
TheCodedProf22586d52023-04-23 16:46:32 -040054 const lowerCaseContent = message.content.toLowerCase() || "";
Skyler Greyda16adf2023-03-05 10:22:12 +000055 if (config.filters.clean.channels.includes(message.channel.id)) {
TheCodedProfc7e8ef12023-04-22 22:28:11 -040056 if (!checkUserForExceptions(message.member!, config.filters.clean.allowed)) return await message.delete();
TheCodedProfad0b8202023-02-14 14:27:09 -050057 }
TheCodedProfbaee2c12023-02-18 16:11:06 -050058
pineafan63fc5e22022-08-04 22:04:10 +010059 const filter = getEmojiByName("ICONS.FILTER");
60 let attachmentJump = "";
Skyler Greyf97e8642023-04-23 21:32:40 +000061 // console.log(config.logging.attachments.saved);
Skyler Grey75ea9172022-08-06 10:22:23 +010062 if (config.logging.attachments.saved[message.channel.id + message.id]) {
Skyler Grey11236ba2022-08-08 21:13:33 +010063 attachmentJump = ` [[View attachments]](${config.logging.attachments.saved[message.channel.id + message.id]})`;
Skyler Grey75ea9172022-08-06 10:22:23 +010064 }
pineafan63fc5e22022-08-04 22:04:10 +010065 const list = {
pineafan813bdf42022-07-24 10:39:10 +010066 messageId: entry(message.id, `\`${message.id}\``),
67 sentBy: entry(message.author.id, renderUser(message.author)),
68 sentIn: entry(message.channel.id, renderChannel(message.channel)),
TheCodedProf6ec331b2023-02-20 12:13:06 -050069 deleted: entry(Date.now(), renderDelta(Date.now())),
pineafan813bdf42022-07-24 10:39:10 +010070 mentions: message.mentions.users.size,
Skyler Grey11236ba2022-08-08 21:13:33 +010071 attachments: entry(message.attachments.size, message.attachments.size + attachmentJump),
pineafan813bdf42022-07-24 10:39:10 +010072 repliedTo: entry(
PineaFan538d3752023-01-12 21:48:23 +000073 (message.reference ? message.reference.messageId : null) ?? null,
Skyler Grey75ea9172022-08-06 10:22:23 +010074 message.reference
75 ? `[[Jump to message]](https://discord.com/channels/${message.guild.id}/${message.channel.id}/${message.reference.messageId})`
76 : "None"
pineafan813bdf42022-07-24 10:39:10 +010077 )
pineafan63fc5e22022-08-04 22:04:10 +010078 };
pineafan813bdf42022-07-24 10:39:10 +010079
80 if (config.filters.invite.enabled) {
TheCodedProfc7e8ef12023-04-22 22:28:11 -040081 if (
Skyler Greydaf11b52023-04-23 21:17:42 +000082 !(
83 config.filters.invite.allowed.channels.includes(message.channel.id) ||
84 checkUserForExceptions(message.member!, config.filters.invite.allowed)
85 ) &&
86 /(?:https?:\/\/)?discord(?:app)?\.(?:com\/invite|gg)\/[a-zA-Z0-9]+\/?/.test(lowerCaseContent)
TheCodedProfc7e8ef12023-04-22 22:28:11 -040087 ) {
Skyler Greydaf11b52023-04-23 21:17:42 +000088 messageException(message.guild.id, message.channel.id, message.id);
89 await message.delete();
90 const data = {
91 meta: {
92 type: "messageDelete",
93 displayName: "Message Deleted",
94 calculateType: "autoModeratorDeleted",
95 color: NucleusColors.red,
96 emoji: "MESSAGE.DELETE",
97 timestamp: Date.now()
98 },
99 separate: {
100 start:
101 filter +
102 " Contained invite\n\n" +
103 (lowerCaseContent
104 ? `**Message:**\n\`\`\`${message.content}\`\`\``
105 : "**Message:** *Message had no content*")
106 },
107 list: list,
108 hidden: {
109 guild: message.channel.guild.id
110 }
111 };
112 return log(data);
pineafan813bdf42022-07-24 10:39:10 +0100113 }
114 }
115
116 if (fileNames.files.length > 0) {
pineafan63fc5e22022-08-04 22:04:10 +0100117 for (const element of fileNames.files) {
pineafan63fc5e22022-08-04 22:04:10 +0100118 const url = element.url ? element.url : element.local;
Skyler Greyda16adf2023-03-05 10:22:12 +0000119 if (
Skyler Grey0d885222023-03-08 21:46:37 +0000120 /\.(jpg|jpeg|png|apng|gif|gifv|webm|webp|mp4|wav|mp3|ogg|jfif|mpeg-\d|avi|h\.264|h\.265)$/.test(
Skyler Greyda16adf2023-03-05 10:22:12 +0000121 url.toLowerCase()
122 )
123 ) {
Skyler Grey0d885222023-03-08 21:46:37 +0000124 // j(pe?g|fif)|a?png|gifv?|w(eb[mp]|av)|mp([34]|eg-\d)|ogg|avi|h\.26(4|5)
125 // ^no
Skyler Grey75ea9172022-08-06 10:22:23 +0100126 if (
Skyler Greyc634e2b2022-08-06 17:50:48 +0100127 config.filters.images.NSFW &&
Skyler Grey0d885222023-03-08 21:46:37 +0000128 !(message.channel instanceof ThreadChannel ? message.channel.parent?.nsfw : message.channel.nsfw) &&
Skyler Grey74169642023-03-09 11:59:09 +0000129 (await NSFWCheck(element.url))
Skyler Grey75ea9172022-08-06 10:22:23 +0100130 ) {
Skyler Grey0d885222023-03-08 21:46:37 +0000131 messageException(message.guild.id, message.channel.id, message.id);
132 await message.delete();
133 const data = {
134 meta: {
135 type: "messageDelete",
136 displayName: "Message Deleted",
137 calculateType: "autoModeratorDeleted",
138 color: NucleusColors.red,
139 emoji: "MESSAGE.DELETE",
140 timestamp: Date.now()
141 },
142 separate: {
143 start:
144 filter +
145 " Image detected as NSFW\n\n" +
TheCodedProf22586d52023-04-23 16:46:32 -0400146 (lowerCaseContent
147 ? `**Message:**\n\`\`\`${message.content}\`\`\``
Skyler Grey0d885222023-03-08 21:46:37 +0000148 : "**Message:** *Message had no content*")
149 },
150 list: list,
151 hidden: {
152 guild: message.channel.guild.id
153 }
154 };
155 return log(data);
pineafan813bdf42022-07-24 10:39:10 +0100156 }
Skyler Greyc634e2b2022-08-06 17:50:48 +0100157 if (config.filters.wordFilter.enabled) {
158 const text = await TestImage(url);
159 const check = TestString(
160 text ?? "",
161 config.filters.wordFilter.words.loose,
162 config.filters.wordFilter.words.strict
163 );
TheCodedProfc7e8ef12023-04-22 22:28:11 -0400164 if (
165 check !== null &&
166 (!checkUserForExceptions(message.member!, config.filters.wordFilter.allowed) ||
167 !config.filters.wordFilter.allowed.channels.includes(message.channel.id))
168 ) {
PineaFan0d06edc2023-01-17 22:10:31 +0000169 messageException(message.guild.id, message.channel.id, message.id);
Skyler Greyc634e2b2022-08-06 17:50:48 +0100170 await message.delete();
171 const data = {
172 meta: {
173 type: "messageDelete",
174 displayName: "Message Deleted",
175 calculateType: "autoModeratorDeleted",
176 color: NucleusColors.red,
177 emoji: "MESSAGE.DELETE",
TheCodedProf6ec331b2023-02-20 12:13:06 -0500178 timestamp: Date.now()
Skyler Greyc634e2b2022-08-06 17:50:48 +0100179 },
180 separate: {
181 start:
182 filter +
183 " Image contained filtered word\n\n" +
TheCodedProf22586d52023-04-23 16:46:32 -0400184 (lowerCaseContent
185 ? `**Message:**\n\`\`\`${message.content}\`\`\``
Skyler Greyc634e2b2022-08-06 17:50:48 +0100186 : "**Message:** *Message had no content*")
187 },
188 list: list,
189 hidden: {
190 guild: message.channel.guild.id
191 }
192 };
193 return log(data);
194 }
195 }
196 if (config.filters.images.size) {
197 if (url.match(/\.+(webp|png|jpg)$/gi)) {
198 if (!(await SizeCheck(element))) {
PineaFan0d06edc2023-01-17 22:10:31 +0000199 messageException(message.guild.id, message.channel.id, message.id);
Skyler Greyc634e2b2022-08-06 17:50:48 +0100200 await message.delete();
201 const data = {
202 meta: {
203 type: "messageDelete",
204 displayName: "Message Deleted",
205 calculateType: "autoModeratorDeleted",
206 color: NucleusColors.red,
207 emoji: "MESSAGE.DELETE",
TheCodedProf6ec331b2023-02-20 12:13:06 -0500208 timestamp: Date.now()
Skyler Greyc634e2b2022-08-06 17:50:48 +0100209 },
210 separate: {
211 start:
212 filter +
213 " Image was too small\n\n" +
TheCodedProf22586d52023-04-23 16:46:32 -0400214 (lowerCaseContent
215 ? `**Message:**\n\`\`\`${message.content}\`\`\``
Skyler Greyc634e2b2022-08-06 17:50:48 +0100216 : "**Message:** *Message had no content*")
217 },
218 list: list,
219 hidden: {
220 guild: message.channel.guild.id
221 }
222 };
223 return log(data);
224 }
225 }
226 }
227 }
Skyler Grey0d885222023-03-08 21:46:37 +0000228 if (config.filters.malware && (await MalwareCheck(url))) {
229 messageException(message.guild.id, message.channel.id, message.id);
230 await message.delete();
231 const data = {
232 meta: {
233 type: "messageDelete",
234 displayName: "Message Deleted",
235 calculateType: "autoModeratorDeleted",
236 color: NucleusColors.red,
237 emoji: "MESSAGE.DELETE",
238 timestamp: Date.now()
239 },
240 separate: {
241 start:
242 filter +
243 " File detected as malware\n\n" +
Skyler Greydaf11b52023-04-23 21:17:42 +0000244 (lowerCaseContent
245 ? `**Message:**\n\`\`\`${message.content}\`\`\``
246 : "**Message:** *Message had no content*")
Skyler Grey0d885222023-03-08 21:46:37 +0000247 },
248 list: list,
249 hidden: {
250 guild: message.channel.guild.id
251 }
252 };
253 return log(data);
pineafan813bdf42022-07-24 10:39:10 +0100254 }
pineafan63fc5e22022-08-04 22:04:10 +0100255 }
pineafan813bdf42022-07-24 10:39:10 +0100256 }
pineafan813bdf42022-07-24 10:39:10 +0100257
pineafan63fc5e22022-08-04 22:04:10 +0100258 const linkDetectionTypes = await LinkCheck(message);
pineafan813bdf42022-07-24 10:39:10 +0100259 if (linkDetectionTypes.length > 0) {
PineaFan0d06edc2023-01-17 22:10:31 +0000260 messageException(message.guild.id, message.channel.id, message.id);
pineafan63fc5e22022-08-04 22:04:10 +0100261 await message.delete();
262 const data = {
pineafan813bdf42022-07-24 10:39:10 +0100263 meta: {
pineafan63fc5e22022-08-04 22:04:10 +0100264 type: "messageDelete",
265 displayName: "Message Deleted",
266 calculateType: "autoModeratorDeleted",
pineafan813bdf42022-07-24 10:39:10 +0100267 color: NucleusColors.red,
pineafan63fc5e22022-08-04 22:04:10 +0100268 emoji: "MESSAGE.DELETE",
TheCodedProf6ec331b2023-02-20 12:13:06 -0500269 timestamp: Date.now()
pineafan813bdf42022-07-24 10:39:10 +0100270 },
271 separate: {
Skyler Grey75ea9172022-08-06 10:22:23 +0100272 start:
273 filter +
274 ` Link filtered as ${linkDetectionTypes[0]?.toLowerCase()}\n\n` +
Skyler Greydaf11b52023-04-23 21:17:42 +0000275 (lowerCaseContent
276 ? `**Message:**\n\`\`\`${message.content}\`\`\``
277 : "**Message:** *Message had no content*")
pineafan813bdf42022-07-24 10:39:10 +0100278 },
279 list: list,
280 hidden: {
281 guild: message.channel.guild.id
282 }
pineafan63fc5e22022-08-04 22:04:10 +0100283 };
pineafan813bdf42022-07-24 10:39:10 +0100284 return log(data);
285 }
pineafane23c4ec2022-07-27 21:56:27 +0100286
TheCodedProfc7e8ef12023-04-22 22:28:11 -0400287 if (
288 config.filters.wordFilter.enabled &&
Skyler Grey73fbcdd2023-04-23 21:23:35 +0000289 !(
290 checkUserForExceptions(message.member!, config.filters.wordFilter.allowed) ||
291 config.filters.wordFilter.allowed.channels.includes(message.channel.id)
292 )
TheCodedProfc7e8ef12023-04-22 22:28:11 -0400293 ) {
Skyler Grey75ea9172022-08-06 10:22:23 +0100294 const check = TestString(
TheCodedProf22586d52023-04-23 16:46:32 -0400295 lowerCaseContent,
Skyler Grey75ea9172022-08-06 10:22:23 +0100296 config.filters.wordFilter.words.loose,
TheCodedProf21d4b0f2023-04-22 21:02:51 -0400297 config.filters.wordFilter.words.strict
Skyler Grey75ea9172022-08-06 10:22:23 +0100298 );
299 if (check !== null) {
PineaFan0d06edc2023-01-17 22:10:31 +0000300 messageException(message.guild.id, message.channel.id, message.id);
pineafan63fc5e22022-08-04 22:04:10 +0100301 await message.delete();
302 const data = {
pineafan813bdf42022-07-24 10:39:10 +0100303 meta: {
pineafan63fc5e22022-08-04 22:04:10 +0100304 type: "messageDelete",
305 displayName: "Message Deleted",
306 calculateType: "autoModeratorDeleted",
pineafan813bdf42022-07-24 10:39:10 +0100307 color: NucleusColors.red,
pineafan63fc5e22022-08-04 22:04:10 +0100308 emoji: "MESSAGE.DELETE",
TheCodedProf6ec331b2023-02-20 12:13:06 -0500309 timestamp: Date.now()
pineafan813bdf42022-07-24 10:39:10 +0100310 },
311 separate: {
Skyler Grey75ea9172022-08-06 10:22:23 +0100312 start:
313 filter +
314 " Message contained filtered word\n\n" +
Skyler Greydaf11b52023-04-23 21:17:42 +0000315 (lowerCaseContent
316 ? `**Message:**\n\`\`\`${message.content}\`\`\``
317 : "**Message:** *Message had no content*")
pineafan813bdf42022-07-24 10:39:10 +0100318 },
319 list: list,
320 hidden: {
321 guild: message.channel.guild.id
322 }
pineafan63fc5e22022-08-04 22:04:10 +0100323 };
pineafan813bdf42022-07-24 10:39:10 +0100324 return log(data);
325 }
326 }
327
TheCodedProfc7e8ef12023-04-22 22:28:11 -0400328 if (
329 config.filters.pings.everyone &&
330 message.mentions.everyone &&
331 !checkUserForExceptions(message.member!, config.filters.pings.allowed)
332 ) {
Skyler Greyda16adf2023-03-05 10:22:12 +0000333 if (!(await isLogging(message.guild.id, "messageMassPing"))) return;
pineafan63fc5e22022-08-04 22:04:10 +0100334 const data = {
pineafane23c4ec2022-07-27 21:56:27 +0100335 meta: {
pineafan63fc5e22022-08-04 22:04:10 +0100336 type: "everyonePing",
337 displayName: "Everyone Pinged",
338 calculateType: "messageMassPing",
pineafane23c4ec2022-07-27 21:56:27 +0100339 color: NucleusColors.yellow,
pineafan63fc5e22022-08-04 22:04:10 +0100340 emoji: "MESSAGE.PING.EVERYONE",
TheCodedProf6ec331b2023-02-20 12:13:06 -0500341 timestamp: Date.now()
pineafane23c4ec2022-07-27 21:56:27 +0100342 },
343 separate: {
Skyler Greydaf11b52023-04-23 21:17:42 +0000344 start: lowerCaseContent
345 ? `**Message:**\n\`\`\`${message.content}\`\`\``
346 : "**Message:** *Message had no content*"
pineafane23c4ec2022-07-27 21:56:27 +0100347 },
348 list: list,
349 hidden: {
350 guild: message.channel.guild.id
pineafan813bdf42022-07-24 10:39:10 +0100351 }
pineafan63fc5e22022-08-04 22:04:10 +0100352 };
pineafane23c4ec2022-07-27 21:56:27 +0100353 return log(data);
354 }
TheCodedProfc7e8ef12023-04-22 22:28:11 -0400355 if (config.filters.pings.roles && !checkUserForExceptions(message.member!, config.filters.pings.allowed)) {
Skyler Grey75ea9172022-08-06 10:22:23 +0100356 for (const roleId in message.mentions.roles) {
pineafan63fc5e22022-08-04 22:04:10 +0100357 if (!config.filters.pings.allowed.roles.includes(roleId)) {
PineaFan0d06edc2023-01-17 22:10:31 +0000358 messageException(message.guild.id, message.channel.id, message.id);
pineafan63fc5e22022-08-04 22:04:10 +0100359 await message.delete();
Skyler Greyda16adf2023-03-05 10:22:12 +0000360 if (!(await isLogging(message.guild.id, "messageMassPing"))) return;
pineafan63fc5e22022-08-04 22:04:10 +0100361 const data = {
pineafane23c4ec2022-07-27 21:56:27 +0100362 meta: {
pineafan63fc5e22022-08-04 22:04:10 +0100363 type: "rolePing",
364 displayName: "Role Pinged",
365 calculateType: "messageMassPing",
pineafane23c4ec2022-07-27 21:56:27 +0100366 color: NucleusColors.yellow,
pineafan63fc5e22022-08-04 22:04:10 +0100367 emoji: "MESSAGE.PING.ROLE",
TheCodedProf6ec331b2023-02-20 12:13:06 -0500368 timestamp: Date.now()
pineafane23c4ec2022-07-27 21:56:27 +0100369 },
370 separate: {
TheCodedProf22586d52023-04-23 16:46:32 -0400371 start: lowerCaseContent
372 ? `**Message:**\n\`\`\`${message.content}\`\`\``
Skyler Grey75ea9172022-08-06 10:22:23 +0100373 : "**Message:** *Message had no content*"
pineafane23c4ec2022-07-27 21:56:27 +0100374 },
375 list: list,
376 hidden: {
377 guild: message.channel.guild.id
pineafan813bdf42022-07-24 10:39:10 +0100378 }
pineafan63fc5e22022-08-04 22:04:10 +0100379 };
pineafane23c4ec2022-07-27 21:56:27 +0100380 return log(data);
pineafan813bdf42022-07-24 10:39:10 +0100381 }
382 }
pineafane23c4ec2022-07-27 21:56:27 +0100383 }
TheCodedProfc7e8ef12023-04-22 22:28:11 -0400384 if (
385 message.mentions.users.size >= config.filters.pings.mass &&
386 config.filters.pings.mass &&
387 !checkUserForExceptions(message.member!, config.filters.pings.allowed)
388 ) {
PineaFan0d06edc2023-01-17 22:10:31 +0000389 messageException(message.guild.id, message.channel.id, message.id);
pineafan63fc5e22022-08-04 22:04:10 +0100390 await message.delete();
Skyler Greyda16adf2023-03-05 10:22:12 +0000391 if (!(await isLogging(message.guild.id, "messageMassPing"))) return;
pineafan63fc5e22022-08-04 22:04:10 +0100392 const data = {
pineafane23c4ec2022-07-27 21:56:27 +0100393 meta: {
pineafan63fc5e22022-08-04 22:04:10 +0100394 type: "massPing",
395 displayName: "Mass Ping",
396 calculateType: "messageMassPing",
pineafane23c4ec2022-07-27 21:56:27 +0100397 color: NucleusColors.yellow,
pineafan63fc5e22022-08-04 22:04:10 +0100398 emoji: "MESSAGE.PING.MASS",
TheCodedProf6ec331b2023-02-20 12:13:06 -0500399 timestamp: Date.now()
pineafane23c4ec2022-07-27 21:56:27 +0100400 },
401 separate: {
Skyler Greydaf11b52023-04-23 21:17:42 +0000402 start: lowerCaseContent
403 ? `**Message:**\n\`\`\`${message.content}\`\`\``
404 : "**Message:** *Message had no content*"
pineafane23c4ec2022-07-27 21:56:27 +0100405 },
406 list: list,
407 hidden: {
408 guild: message.channel.guild.id
pineafan813bdf42022-07-24 10:39:10 +0100409 }
pineafan63fc5e22022-08-04 22:04:10 +0100410 };
pineafane23c4ec2022-07-27 21:56:27 +0100411 return log(data);
pineafan813bdf42022-07-24 10:39:10 +0100412 }
413}