mirror of https://github.com/thaldrin/thaldrin.git
22 lines
704 B
TypeScript
22 lines
704 B
TypeScript
import Command from '../../handler/structures/Command';
|
|
import { Context } from '../../utils/types';
|
|
import language from '../../utils/language';
|
|
import replace from '../../utils/replace';
|
|
|
|
export = class Invite extends Command {
|
|
constructor() {
|
|
super({
|
|
name: "invite",
|
|
description: "Invite the bot to your server",
|
|
aliases: ["inv"],
|
|
cooldown: 1,
|
|
})
|
|
}
|
|
|
|
async command(ctx: Context) {
|
|
// TODO: generate custom invites for every server
|
|
// @ts-ignore
|
|
ctx.channel.send(`${replace(/BOT/gi, ctx.config.variables.name, language.get(ctx.settings.locale).misc.invite)}:\n<${ctx.config.variables.invite}>`)
|
|
|
|
}
|
|
} |