stub
This commit is contained in:
parent
77101f1cc2
commit
67d53818f3
1 changed files with 9 additions and 2 deletions
11
index.ts
11
index.ts
|
@ -1,9 +1,16 @@
|
||||||
import { Client, Events, GatewayIntentBits } from 'discord.js';
|
import { Client, Events, GatewayIntentBits } from 'discord.js';
|
||||||
|
|
||||||
const client = new Client({ intents: [GatewayIntentBits.Guilds] });
|
const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent] });
|
||||||
|
|
||||||
client.once(Events.ClientReady, (c) => {
|
client.once(Events.ClientReady, (c) => {
|
||||||
console.log(`Ready! Logged in as ${c.user.tag}`);
|
console.log(c.user.tag);
|
||||||
|
});
|
||||||
|
|
||||||
|
client.on(Events.MessageCreate, async (message) => {
|
||||||
|
if (message.author.bot) return;
|
||||||
|
if (client.user && message.mentions.has(client.user)) {
|
||||||
|
await message.reply(`hi ${message.author}\n-# TODO: make this show user info`);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
client.login(process.env.TOKEN).catch((err) => {
|
client.login(process.env.TOKEN).catch((err) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue