Add an invite command.

This commit is contained in:
zkldi
2022-04-03 19:48:53 +01:00
parent feac626939
commit dcb4a990f1
2 changed files with 18 additions and 0 deletions
+2
View File
@@ -7,6 +7,7 @@ import profile from "./commands/profile";
import quote from "./commands/quote";
import sync from "./commands/sync";
import whois from "./commands/whois";
import invite from "./commands/invite";
import { SlashCommand } from "./types";
export const SLASH_COMMANDS: Map<string, SlashCommand> = new Map(
@@ -28,5 +29,6 @@ if (ServerConfig.type !== "btchi") {
// btchi or omni specific commands
if (ServerConfig.type !== "ktchi") {
SLASH_COMMANDS.set("invite", invite);
// None. Yet!
}
+16
View File
@@ -0,0 +1,16 @@
import { SlashCommandBuilder } from "@discordjs/builders";
import { client } from "../../main";
import { SlashCommand } from "../types";
const command: SlashCommand = {
info: new SlashCommandBuilder()
.setName("invite")
.setDescription("Invite this bot to another server.")
.toJSON(),
exec: () => `To invite me into another server, use this link:
https://discord.com/api/oauth2/authorize?client_id=${
client.application!.id
}&permissions=0&scope=bot%20applications.commands`,
};
export default command;