-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathindex.js
More file actions
24 lines (22 loc) · 1.03 KB
/
Copy pathindex.js
File metadata and controls
24 lines (22 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
const OPCommands = require("../src/OPCommands.js");
const Discord = require("discord.js");
const client = new Discord.Client({
intents: 32767
});
const handler = new OPCommands(client, {
commandsDir: "commands",
eventsDir: "events",
testGuildID: "TEST_GUILD_ID",
testMode: false,
logs: true,
notifyOwner: true,
});
handler.setBotOwner("BOT_OWNER_ID");
handler.setMessages({
ownerOnly: (interaction) => interaction.reply("Missing **Bot Owner** permission."),
permissions: (interaction, perms) => interaction.reply(`You are missing the following permissions: **${perms.join(", ")}**`),
cooldown: (interaction, cooldown) => interaction.reply(`You must wait **${cooldown}** before executing another command.`),
notifyOwnerMessage: (owner) => owner.send("I'm online!"),
notifyCommandMessage: (owner, interaction) => owner.send("[OPCommands] Administrator command `" + interaction.commandName + "` was executed by " + `<@${interaction.user.id}> in **${interaction.guild.name}**`)
});
client.login("BOT_TOKEN");