Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion src/Bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,15 @@ import { TryCommand } from "./commands/general";
import { UrlCommand } from "./commands/link";
import onInteraction from "./events/onInteraction";
import onReady from "./events/onReady";
import onMessageCreate from "./events/onMessageCreate";
import { Command } from "./structures/Command";

dotenv.config();
const client = new Client({ intents: [] });
const client = new Client({ intents: [
'MessageContent',
'GuildMessages',
'Guilds'
] });
const token = process.env.token;

export const Commands: Command[] = [
Expand All @@ -17,5 +22,6 @@ export const Commands: Command[] = [

onReady(client);
onInteraction(client);
onMessageCreate(client);

client.login(token);
13 changes: 13 additions & 0 deletions src/events/onMessageCreate.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import { ChatInputCommandInteraction, Client, Interaction, Message } from "discord.js";
import { Commands } from "../Bot";
import { errorEmbed } from "../utils/EmbedUtil";

export default (client: Client): void => {
client.on("messageCreate", async (message: Message) => {
if (message.author.bot) return;

if (message.content.toLowerCase().includes('folia')) {
message.reply('**This is the MultiPaper discord server.**\nFor Folia-related questions, head to the PaperMC server instead: https://discord.gg/papermc')
}
});
};