22from . import is_bot_owner
33import discord
44import asyncio
5+ from dataminer import bot_requests
56
67class Set (commands .Cog ):
78 def __init__ (self , bot ):
@@ -12,13 +13,20 @@ def __init__(self, bot):
1213 @commands .group (name = "set" )
1314 async def _set (self , ctx ):
1415 """RETURN ALL AVAILABLE SET FUNCTIONS"""
15- return
16+ bot_requests (ctx .message , str (ctx .command ), self .bot .db )
17+
18+ embed = discord .Embed (title = "`Set` commands" )
19+ embed .add_field (name = "`set game <NAME>`" , value = "Set the game/status of the bot" , inline = False )
20+ embed .add_field (name = "`set prefix <PREFIX>`" , value = "Set the server prefix" , inline = False )
21+ return await ctx .send (embed = embed )
1622
1723 @is_bot_owner ()
1824 @commands .cooldown (1 , 10.0 , commands .BucketType .user )
1925 @_set .command (name = "game" )
2026 async def _set_game (self , ctx , * , game_name : str ):
2127 """SET BOT GAME"""
28+ bot_requests (ctx .message , str (ctx .command ), self .bot .db )
29+
2230 await ctx .send (f"React with 👌 to change the game to `{ game_name } `!" )
2331
2432 def check (reaction , user ):
@@ -38,6 +46,8 @@ def check(reaction, user):
3846 @_set .command (name = "prefix" )
3947 async def _set_prefix (self , ctx , * , prefix : str ):
4048 """SET A SERVER PREFIX"""
49+ bot_requests (ctx .message , str (ctx .command ), self .bot .db )
50+
4151 self .bot .db .update ({"_id" : str (ctx .guild .id )}, {"$set" : {"prefix" : prefix }})
4252
4353 await ctx .send ("React with 👌 to change the prefix!" )
0 commit comments