2021-09-11 11:36:51 +00:00
|
|
|
import { Command } from '@thaldrin/eu';
|
|
|
|
|
|
|
|
import { Context } from '../../../utils/types';
|
|
|
|
import language from '../../../utils/language';
|
|
|
|
import replace from '../../../utils/replace';
|
2021-05-05 12:57:42 +00:00
|
|
|
|
|
|
|
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
|
2021-07-09 17:52:25 +00:00
|
|
|
ctx.channel.send(`${replace(/BOT/gi, ctx.config.variables.name, language.get(ctx.settings.locale).misc.invite)}:\n<${ctx.config.variables.invite}>`)
|
2021-05-05 12:57:42 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
}
|