thaldrin/src/modules/misc/invite.ts

22 lines
704 B
TypeScript
Raw Normal View History

2021-05-05 12:57:42 +00:00
import Command from '../../handler/structures/Command';
import { Context } from '../../utils/types';
2021-07-09 17:52:25 +00:00
import language from '../../utils/language';
2021-05-05 23:20:13 +00:00
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
}
}