33Description:
44This is a template to create your own discord bot in python.
55
6- Version: 5.2.1
6+ Version: 5.3
77"""
88
99import platform
@@ -26,9 +26,11 @@ def __init__(self, bot):
2626 name = "help" ,
2727 description = "List all commands the bot has loaded."
2828 )
29+ @checks .not_blacklisted ()
2930 async def help (self , context : Context ) -> None :
3031 prefix = self .bot .config ["prefix" ]
31- embed = discord .Embed (title = "Help" , description = "List of available commands:" , color = 0x9C84EF )
32+ embed = discord .Embed (
33+ title = "Help" , description = "List of available commands:" , color = 0x9C84EF )
3234 for i in self .bot .cogs :
3335 cog = self .bot .get_cog (i .lower ())
3436 commands = cog .get_commands ()
@@ -37,7 +39,8 @@ async def help(self, context: Context) -> None:
3739 description = command .description .partition ('\n ' )[0 ]
3840 data .append (f"{ prefix } { command .name } - { description } " )
3941 help_text = "\n " .join (data )
40- embed .add_field (name = i .capitalize (), value = f'```{ help_text } ```' , inline = False )
42+ embed .add_field (name = i .capitalize (),
43+ value = f'```{ help_text } ```' , inline = False )
4144 await context .send (embed = embed )
4245
4346 @commands .hybrid_command (
@@ -48,7 +51,7 @@ async def help(self, context: Context) -> None:
4851 async def botinfo (self , context : Context ) -> None :
4952 """
5053 Get some useful (or not) information about the bot.
51-
54+
5255 :param context: The hybrid command context.
5356 """
5457 embed = discord .Embed (
@@ -86,7 +89,7 @@ async def botinfo(self, context: Context) -> None:
8689 async def serverinfo (self , context : Context ) -> None :
8790 """
8891 Get some useful (or not) information about the server.
89-
92+
9093 :param context: The hybrid command context.
9194 """
9295 roles = [role .name for role in context .guild .roles ]
@@ -100,7 +103,7 @@ async def serverinfo(self, context: Context) -> None:
100103 description = f"{ context .guild } " ,
101104 color = 0x9C84EF
102105 )
103- if context .guild .icon is not None :
106+ if context .guild .icon is not None :
104107 embed .set_thumbnail (
105108 url = context .guild .icon .url
106109 )
@@ -133,7 +136,7 @@ async def serverinfo(self, context: Context) -> None:
133136 async def ping (self , context : Context ) -> None :
134137 """
135138 Check if the bot is alive.
136-
139+
137140 :param context: The hybrid command context.
138141 """
139142 embed = discord .Embed (
@@ -151,7 +154,7 @@ async def ping(self, context: Context) -> None:
151154 async def invite (self , context : Context ) -> None :
152155 """
153156 Get the invite link of the bot to be able to invite it.
154-
157+
155158 :param context: The hybrid command context.
156159 """
157160 embed = discord .Embed (
@@ -173,7 +176,7 @@ async def invite(self, context: Context) -> None:
173176 async def server (self , context : Context ) -> None :
174177 """
175178 Get the invite link of the discord server of the bot for some support.
176-
179+
177180 :param context: The hybrid command context.
178181 """
179182 embed = discord .Embed (
@@ -195,7 +198,7 @@ async def server(self, context: Context) -> None:
195198 async def eight_ball (self , context : Context , * , question : str ) -> None :
196199 """
197200 Ask any question to the bot.
198-
201+
199202 :param context: The hybrid command context.
200203 :param question: The question that should be asked by the user.
201204 """
@@ -222,7 +225,7 @@ async def eight_ball(self, context: Context, *, question: str) -> None:
222225 async def bitcoin (self , context : Context ) -> None :
223226 """
224227 Get the current price of bitcoin.
225-
228+
226229 :param context: The hybrid command context.
227230 """
228231 # This will prevent your bot from stopping everything when doing a web request - see: https://discordpy.readthedocs.io/en/stable/faq.html#how-do-i-make-a-web-request
0 commit comments