48 lines
1.4 KiB
TypeScript
48 lines
1.4 KiB
TypeScript
|
|
import { config } from "#/config";
|
||
|
|
|
||
|
|
import {createBot, Intents} from "discordeno"
|
||
|
|
|
||
|
|
const intents = [
|
||
|
|
Intents.GuildModeration ,
|
||
|
|
Intents.GuildWebhooks ,
|
||
|
|
Intents.GuildExpressions ,
|
||
|
|
Intents.GuildScheduledEvents ,
|
||
|
|
Intents.GuildMessagePolls ,
|
||
|
|
Intents.GuildIntegrations ,
|
||
|
|
Intents.GuildInvites ,
|
||
|
|
Intents.GuildMessageReactions ,
|
||
|
|
Intents.GuildPresences ,
|
||
|
|
Intents.DirectMessages ,
|
||
|
|
Intents.DirectMessageReactions ,
|
||
|
|
Intents.GuildMembers ,
|
||
|
|
Intents.Guilds ,
|
||
|
|
Intents.GuildInvites ,
|
||
|
|
Intents.GuildMessages,
|
||
|
|
]
|
||
|
|
|
||
|
|
export const bot = createBot({
|
||
|
|
intents: intents.reduce((acc, curr) => acc | curr, Intents.Guilds),
|
||
|
|
token: config.DISCORD_TOKEN,
|
||
|
|
desiredProperties: {
|
||
|
|
interaction: {
|
||
|
|
id: true,
|
||
|
|
data: true,
|
||
|
|
type: true,
|
||
|
|
token: true,
|
||
|
|
message: true,
|
||
|
|
channelId: true,
|
||
|
|
channel: true,
|
||
|
|
guildId: true,
|
||
|
|
guild: true,
|
||
|
|
user: true,
|
||
|
|
member: true,
|
||
|
|
},
|
||
|
|
message: {
|
||
|
|
id: true,
|
||
|
|
member: true,
|
||
|
|
guildId: true,
|
||
|
|
},
|
||
|
|
}
|
||
|
|
})
|
||
|
|
|