Untitled
unknown
pig
2 years ago
3.2 kB
5
Indexable
@client.event
async def on_ready():
print("We have logged in as {0.user} ".format(client))
activity = discord.Game(name=".help", type=3)
await client.change_presence(status=discord.Status.online, activity=activity)
@client.group(invoke_without_command=True)
async def help(ctx):
embed = discord.Embed(title="IndianDesiMemer Help Center ✨",color=0xF49726)
embed.add_field(name="Command Categories :",value="🐸 `memes :` Image generation with a memey twist.\n" + "🔧 `utility :` Bot utility zone\n😏 `nsfw :` Image generation with a memey twist.\n\nTo view the commands of a category, send `.help <category>`" ,inline=False)
embed.set_footer(icon_url=ctx.author.avatar_url,text="Help requested by: {}".format(ctx.author.display_name))
await ctx.send(embed=embed) @client.event
async def on_ready():
print("We have logged in as {0.user} ".format(client))
activity = discord.Game(name=".help", type=3)
await client.change_presence(status=discord.Status.online, activity=activity) Sub-help command of memes
@help.command ()
async def memes(ctx):
embed=discord.Embed(title="IndianDesiMemer Help Center ✨", description="Commands of **meme** \n`.meme:`Memes",inline=False)
embed.set_footer(icon_url=ctx.author.avatar_url,text="Command requested by: {}".format(ctx.author.display_name))
await ctx.send(embed=embed) #Sub-help command of memes
@help.command ()
async def memes(ctx):
embed=discord.Embed(title="IndianDesiMemer Help Center ✨", description="Commands of **meme** \n`.meme:`Memes",inline=False)
embed.set_footer(icon_url=ctx.author.avatar_url,text="Command requested by: {}".format(ctx.author.display_name))
await ctx.send(embed=embed)
#Sub-help commands of nsfw
@help.command ()
async def nsfw(ctx) :
embed=discord.Embed(title="IndianDesiMemer Help Center ✨", description="Commands of **nsfw** \n`.nsfw:`NSFW", color=0xF49726)
embed.set_footer(icon_url=ctx.author.avatar_url,text="Command requested by: {}".format(ctx.author.display_name))
await ctx.send(embed=embed)
#Sub-help commands of utility
@help.command ()
async def utility(ctx) :
embed=discord.Embed(title="IndianDesiMemer Help Center ✨", description="Commands of **utility** \n`.ping:`Latency", color=0xF49726)
embed.set_footer(icon_url=ctx.author.avatar_url,text="Command requested by: {}".format(ctx.author.display_name))
await ctx.send(embed=embed) @client.event
async def on_command_error(ctx, error):
if isinstance(error, commands.CommandOnCooldown):
await ctx.send("**Try after {0} second ".format(round(error.retry_after, 2)))
@client.command()
@commands.cooldown(1, 10, commands.BucketType.channel) # 1 Command every 10 sec
async def meme(ctx):
await ctx.send("Memes") @client.command()
@commands.cooldown(1, 10, commands.BucketType.channel)
async def nsfw(ctx):
if ctx.channel.is_nsfw():
print("nsfw work!!")
else:
print("You can use this command in a nsfw channel only !") Editor is loading...