Moved some commands from EnsoBot.py to HelpCommands.py

Added full custom help command that is dm'ed to the user
pull/1/head
sgoudham 5 years ago
parent aec4fed37c
commit bad28be569

@ -1,5 +1,4 @@
import asyncio
import datetime
import discord
from decouple import config
@ -35,38 +34,6 @@ async def ping(ctx):
await ctx.send(f'Pong! {round(client.latency * 1000)}ms')
# Bot ~roles command allows for an embed message about
@client.command()
@commands.has_any_role('Hamothy')
async def roles(ctx):
embed = discord.Embed(title="```So you wanna know how the leveled roles system works huh?```",
colour=discord.Colour(0x30e419),
description="------------------------------------------------")
embed.timestamp = datetime.datetime.utcnow()
embed.set_image(url="https://media.discordapp.net/attachments/669812887564320769/717149671771996180/unknown.png")
embed.set_thumbnail(url="https://cdn.discordapp.com/attachments/683490529862090814/715010931620446269/image1.jpg")
embed.set_author(name="Hamothy",
icon_url="https://cdn.discordapp.com/attachments/689525645734182916/717137453651066900"
"/Rias_Gremory.png")
embed.set_footer(
text="---------------------------------------------------------------------------------")
embed.add_field(name="Cooldown", value="**•XP is gained every time you talk with a 2 minute cooldown.**",
inline=True),
embed.add_field(name="Message Length",
value="**•XP is not determined by the size of the message. You will not get more XP just because "
"the message is bigger.**",
inline=True),
embed.add_field(name="Roles",
value="**•As seen below, those are the colours and roles that will be achieved upon gaining that "
"amount of experience**",
inline=True)
await ctx.send(embed=embed)
# Bot Event for handling cooldown error
@client.event
async def on_command_error(ctx, error):

@ -67,7 +67,7 @@ class Fun(commands.Cog):
f"{target.mention} Your smile is so beautiful it blinds me :heart_eyes: :heart_eyes:",
f"Being on a journey all my life, I will never meet a person as amazing as you are {target.mention}",
f"Such a pleasure to be on the same sever with {target.mention} <:boneappleteeth:676202300573876252> <:boneappleteeth:676202300573876252>",
f"With {target.mention}, even the worst day will be filled with joy <:GWcentrallHUGS:395628394043277313> <:GWcentrallHUGS:395628394043277313>",
f"With {target.mention}, even the worst day will be filled with joy <:hug:718248629034549299> <:hug:718248629034549299>",
f"There's no better antidepressant than {target.mention}",
f"{target.mention} You're great, keep going Σd(˘ꇴ˘๑)",
f"I'd simp for {target.mention} anyday :flushed: :heart_eyes: :flushed: ",
@ -100,7 +100,7 @@ class Fun(commands.Cog):
@cooldown(1, 0.5, BucketType.channel)
async def kissing(self, ctx, target: discord.Member):
channels = ["bot-commands", "picto-chat"]
channels = ["bot-commands", "picto-chat", "general"]
try:
if str(ctx.channel) in channels:

@ -23,27 +23,53 @@ class CustomHelp(commands.Cog):
"/718510466640642099/Rias_Gremory.png")
embed.set_footer(text=f"{ctx.message.author}",
icon_url="https://media.discordapp.net/attachments/689525645734182916/718510466640642099/Rias_Gremory.png")
embed.add_field(
name="\u200b",
value="```css" +
"\n ( ͡°ω ͡°) Waifu/Husbando Commands ( ͡°ω ͡°)" +
"\n ( ͡°ω ͡°) Fun Commands ( ͡°ω ͡°)" +
"```",
inline=False)
embed.add_field(
name="\u200b\u200b",
value="**➳ ~kakashi**" +
"\n Allows for a randomly generated image of Hatake Kakashi",
value="**➳ ~8ball**" +
"\n Allows the user to ask a question and 8ball will give a custom response" +
"\n *(Perms: everyone)*",
inline=True)
embed.add_field(
name="\u200b",
value="**➳ ~rules**" +
"\n Returns the entire ruleset for the server (Perms: Co-Owner)",
value="**➳ ~attack**" +
"\n Allows the user to throw an insult to someone in the server" +
"\n *(Perms: Co-Owner)*",
inline=True)
embed.add_field(
name="\u200b",
value="**➳ ~roles**" +
"\n Shows you how the leveling and xp system works, as well as displaying the order of leveled roles (Perms: Co-Owner)",
value="**➳ ~compliment**" +
"\n Allows the user to compliment someone in the server" +
"\n *(Perms: everyone)*",
inline=True)
embed.add_field(
name="\u200b",
value="**➳ ~kiss**" +
"\n Allows the user to kiss someone in the server" +
"\n *(Perms: Co-Owner)*",
inline=True)
embed.add_field(
name="\u200b",
value="```css" +
"\n ( ͡°ω ͡°) Waifu/Husbando Commands ( ͡°ω ͡°)" +
"```",
inline=False)
embed.add_field(
name="\u200b\u200b",
value="**➳ ~kakashi**" +
"\n Allows for a randomly generated image of Hatake Kakashi" +
"\n *(Perms: everyone)*",
inline=True)
embed.add_field(
name="\u200b",
value="**➳ ~toga**" +
"\n Allows for a randomly generated image of Himiko Toga to be shown" +
"\n *(Perms: everyone)*",
inline=True)
embed.add_field(
name="\u200b",
@ -54,24 +80,27 @@ class CustomHelp(commands.Cog):
embed.add_field(
name="\u200b\u200b",
value="**➳ ~ping**" +
"\n Returns Pong! Along With The Latency in ms",
"\n Returns Pong! Along With The Latency in ms" +
"\n *(Perms: Co-Owner)*",
inline=True)
embed.add_field(
name="\u200b",
value="**➳ ~rules**" +
"\n Returns the entire ruleset for the server (Perms: Co-Owner)",
"\n Returns the entire ruleset for the server" +
"\n *(Perms: Co-Owner)*",
inline=True)
embed.add_field(
name="\u200b",
value="**➳ ~roles**" +
"\n Shows you how the leveling and xp system works, as well as displaying the order of leveled roles (Perms: Co-Owner)",
"\n Shows you how the leveling and xp system works, as well as displaying the order of leveled roles" +
"\n *(Perms: Co-Owner)*",
inline=True)
await author.send(embed=embed)
except Exception as e:
print(e)
# Bot ~roles command allows for an embed message about
# Bot ~rules command allows for an embed message about the leveled roles and xp system
@commands.command(aliases=["Rules", "rule", "Rule"])
@commands.has_any_role('Hamothy')
async def rules(self, ctx, target: discord.Member):
@ -178,6 +207,43 @@ class CustomHelp(commands.Cog):
except Exception as e:
print(e)
# Bot ~roles command allows for an embed message about
@commands.command()
@commands.has_any_role('Hamothy')
async def roles(self, ctx):
try:
embed = discord.Embed(title="```So you wanna know how the leveled roles system works huh?```",
colour=discord.Colour(0x30e419),
description="------------------------------------------------")
embed.timestamp = datetime.datetime.utcnow()
embed.set_image(
url="https://media.discordapp.net/attachments/669812887564320769/717149671771996180/unknown.png")
embed.set_thumbnail(
url="https://cdn.discordapp.com/attachments/683490529862090814/715010931620446269/image1.jpg")
embed.set_author(name="Hamothy",
icon_url="https://cdn.discordapp.com/attachments/689525645734182916/717137453651066900"
"/Rias_Gremory.png")
embed.set_footer(
text="---------------------------------------------------------------------------------")
embed.add_field(name="Cooldown", value="**•XP is gained every time you talk with a 2 minute cooldown.**",
inline=True),
embed.add_field(name="Message Length",
value="**•XP is not determined by the size of the message. You will not get more XP just because "
"the message is bigger.**",
inline=True),
embed.add_field(name="Roles",
value="**•As seen below, those are the colours and roles that will be achieved upon gaining that "
"amount of experience**",
inline=True)
await ctx.send(embed=embed)
except Exception as e:
print(e)
def setup(bot):
bot.add_cog(CustomHelp(bot))

Loading…
Cancel
Save