mirror of
https://wiilab.wiimart.org/wiimart/WiiMartBot
synced 2025-09-02 19:41:03 +02:00
updated to work with only the users that have the perms
This commit is contained in:
parent
b650a37f6e
commit
cb88ebea5f
15
bot.py
15
bot.py
@ -18,4 +18,19 @@ client = discord.Client(intents=intents)
|
||||
token = os.getenv("token")
|
||||
status = os.getenv("status")
|
||||
|
||||
@bot.hybrid_command(name="status",description="Gets the status of WiiMart")
|
||||
async def statusy(ctx):
|
||||
if status == "Not Set":
|
||||
await ctx.send("The status hasnt been set by an admin yet, please check again later.")
|
||||
else:
|
||||
await ctx.send(f"The Current status is: {status}")
|
||||
|
||||
@bot.hybrid_command(name="setstatus",description="Sets the current server status to your liking")
|
||||
@commands.has_any_role("Owner", "Admin", "Moderators")
|
||||
async def setstatus(ctx, stat: str):
|
||||
global status
|
||||
status = stat
|
||||
await ctx.send(f"Status has been set to: {status}")
|
||||
|
||||
|
||||
bot.run(token)
|
2
requirements.txt
Normal file
2
requirements.txt
Normal file
@ -0,0 +1,2 @@
|
||||
discord.py
|
||||
dotenv
|
Loading…
x
Reference in New Issue
Block a user