diff --git a/src/discord/events/messageCreate.ts b/src/discord/events/messageCreate.ts index 60958aae6..3800908cf 100644 --- a/src/discord/events/messageCreate.ts +++ b/src/discord/events/messageCreate.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-unused-vars */ // import { // ChannelType, // } from 'discord-api-types/v10'; @@ -55,72 +56,70 @@ async function getCategory(channel:TextChannel):Promise { export const messageCreate: MessageCreateEvent = { name: 'messageCreate', async execute(message) { - messageCommand(message); - bridgeMessage(message); + // messageCommand(message); + // bridgeMessage(message); // awayMessage(message); // Only run on Tripsit or DM, we don't want to snoop on other guilds ( ͡~ ͜ʖ ͡°) - if (message.guild && message.guild.id !== env.DISCORD_GUILD_ID) { - return; - } - - return; - - const userData = await db.users.upsert({ - where: { - discord_id: message.author.id, - }, - create: { - discord_id: message.author.id, - }, - update: {}, - }); - - if (userData && userData.discord_bot_ban) { - return; - } - - // log.debug(F, `Message: ${JSON.stringify(message, null, 2)}`); - - // This needs to run here because the widget bot peeps will use this and they are "bot users" - // This handles ~ commands - - // Don't run on bots - if (message.author.bot) return; - countMessage(message); - youAre(message); - karma(message); - imagesOnly(message); - discordAiModerate(message); - - // Disabled for testing - // thoughtPolice(message); + // if (message.guild && message.guild.id !== env.DISCORD_GUILD_ID) { + // return; + // } - // // If this is a DM, run the modmail function. - // if (message.channel.type === ChannelType.DM) { - // await modmailDMInteraction(message); + // const userData = await db.users.upsert({ + // where: { + // discord_id: message.author.id, + // }, + // create: { + // discord_id: message.author.id, + // }, + // update: {}, + // }); + + // if (userData && userData.discord_bot_ban) { + // return; // } - // Determine if the bot should give exp - if ( - message.member // Is not a member of a guild - && message.channel // Was not sent in a channel - && (message.channel instanceof TextChannel) // Was not sent in a text channel - && message.guild // Was not sent in a guild - && !ignoredRoles.some(role => message.member?.roles.cache.has(role)) // Has a role that should be ignored - ) { - // Determine what kind of experience to give - const experienceCategory = await getCategory(message.channel); - // Run this now, so that when you're helping in the tech/tripsit rooms you'll always get exp - experience(message.member, experienceCategory, 'TEXT' as experience_type, message.channel); - } + // // log.debug(F, `Message: ${JSON.stringify(message, null, 2)}`); + + // // This needs to run here because the widget bot peeps will use this and they are "bot users" + // // This handles ~ commands + + // // Don't run on bots + // if (message.author.bot) return; + // countMessage(message); + // youAre(message); + // karma(message); + // imagesOnly(message); + // discordAiModerate(message); + + // // Disabled for testing + // // thoughtPolice(message); + + // // // If this is a DM, run the modmail function. + // // if (message.channel.type === ChannelType.DM) { + // // await modmailDMInteraction(message); + // // } + + // // Determine if the bot should give exp + // if ( + // message.member // Is not a member of a guild + // && message.channel // Was not sent in a channel + // && (message.channel instanceof TextChannel) // Was not sent in a text channel + // && message.guild // Was not sent in a guild + // && !ignoredRoles.some(role => message.member?.roles.cache.has(role)) // Has a role that should be ignored + // ) { + // // Determine what kind of experience to give + // const experienceCategory = await getCategory(message.channel); + // // Run this now, so that when you're helping in the tech/tripsit rooms you'll always get exp + // experience(message.member, experienceCategory, 'TEXT' as experience_type, message.channel); + // } - // Check if the message came in a thread in the helpdesk channel + // // Check if the message came in a thread in the helpdesk channel - // if (message.channel.isThread()) { - // modmailThreadInteraction(message); - // } + // // if (message.channel.isThread()) { + // // modmailThreadInteraction(message); + // // } - announcements(message); + // announcements(message); }, };