mirror of
https://github.com/myned/modufur.git
synced 2024-12-25 06:37:29 +00:00
Add invite command
This commit is contained in:
parent
2c171f204c
commit
913ac8b319
1 changed files with 7 additions and 1 deletions
|
@ -2,12 +2,14 @@ import os
|
||||||
|
|
||||||
import lightbulb
|
import lightbulb
|
||||||
|
|
||||||
|
import config as c
|
||||||
|
|
||||||
|
|
||||||
plugin = lightbulb.Plugin("master")
|
plugin = lightbulb.Plugin("master")
|
||||||
|
|
||||||
|
|
||||||
@plugin.command
|
@plugin.command
|
||||||
@lightbulb.option("command", "What is your command, master?", required=False, choices=("reload", "sleep"))
|
@lightbulb.option("command", "What is your command, master?", required=False, choices=("reload", "sleep", "invite"))
|
||||||
@lightbulb.command("master", "Commands my master can demand of me", ephemeral=True)
|
@lightbulb.command("master", "Commands my master can demand of me", ephemeral=True)
|
||||||
@lightbulb.implements(lightbulb.SlashCommand)
|
@lightbulb.implements(lightbulb.SlashCommand)
|
||||||
async def master(context):
|
async def master(context):
|
||||||
|
@ -23,6 +25,10 @@ async def master(context):
|
||||||
case "sleep":
|
case "sleep":
|
||||||
await context.respond("**Goodnight, master.**")
|
await context.respond("**Goodnight, master.**")
|
||||||
await context.bot.close()
|
await context.bot.close()
|
||||||
|
case "invite":
|
||||||
|
await context.respond(
|
||||||
|
f"https://discord.com/api/oauth2/authorize?client_id={c.config['client']}&permissions=0&scope=bot%20applications.commands"
|
||||||
|
)
|
||||||
case _:
|
case _:
|
||||||
await context.respond(f"**Hello, master.**")
|
await context.respond(f"**Hello, master.**")
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in a new issue