1
0
Fork 0
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:
Myned 2022-02-21 15:50:05 -06:00
parent 2c171f204c
commit 913ac8b319
No known key found for this signature in database
GPG key ID: 33790F979F7A28B8

View file

@ -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: