mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 14:13:02 -04:00
rudimentary invite link because link in bot profile doesnt work
This commit is contained in:
parent
8f3a206838
commit
e09140cd6b
1 changed files with 3 additions and 0 deletions
|
@ -16,6 +16,9 @@ module.exports = {
|
||||||
},
|
},
|
||||||
run: async (context, args) => {
|
run: async (context, args) => {
|
||||||
context.triggerTyping();
|
context.triggerTyping();
|
||||||
|
if(!args.invite) return editOrReply(context, createEmbed("default", context, {
|
||||||
|
description: icon("link") + " You can invite the bot with [this](https://discord.com/api/oauth2/authorize?client_id=682654466453012553&permissions=412317247552&scope=bot%20applications.commands) link."
|
||||||
|
}))
|
||||||
try{
|
try{
|
||||||
const inviteCode = args.invite.match(/(?:(?:https|http):\/\/)?(?:(?:discord.gg|(?:discord|discordapp)\.com\/invite)\/)?([A-z0-z-]{2,32})/)
|
const inviteCode = args.invite.match(/(?:(?:https|http):\/\/)?(?:(?:discord.gg|(?:discord|discordapp)\.com\/invite)\/)?([A-z0-z-]{2,32})/)
|
||||||
const invite = await context.client.rest.fetchInvite(inviteCode[1], {withCounts: true})
|
const invite = await context.client.rest.fetchInvite(inviteCode[1], {withCounts: true})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue