Adding the command ~rolemenu into HelpCommands.py

pull/4/head
sgoudham 5 years ago
parent b905a84ecc
commit 3215964ffd

@ -4,7 +4,7 @@ import datetime
import discord
from discord import Embed, Colour
from discord.ext import commands
from discord.ext.commands import command, cooldown, BucketType
from discord.ext.commands import command, cooldown, BucketType, is_owner
# Set up the Cog
@ -68,11 +68,50 @@ class CustomHelp(commands.Cog):
# Remove the role from the member
await member.remove_roles(role)
# Allowing people to get ping-able self roles
@command(name="rolemenu")
@is_owner()
async def role_menu(self, ctx):
# Get the channel id of #self-roles
channel = self.bot.get_channel(722347423913213992)
# Set up embed to let people know what ping-able roles can be chosen
embed = Embed(title="**Role Menu: Ping-Able Roles**",
colour=Colour.orange(),
timestamp=datetime.datetime.utcnow())
embed.set_thumbnail(url="https://media.discordapp.net/attachments/683490529862090814/715010931620446269"
"/image1.jpg?width=658&height=658")
embed.set_author(name=ctx.author, icon_url=ctx.author.avatar_url)
embed.set_footer(text=f"{ctx.message.author}", icon_url=ctx.author.avatar_url)
embed.add_field(
name="\u200b",
value="React to give yourself roles to be pinged for these events!",
inline=False)
embed.add_field(
name="\u200b",
value="<:MovieNight:722293598938333190> : `Movie Nights`",
inline=False)
embed.add_field(
name="\u200b",
value="<:Karaoke:722358251932483605> : `Karaoke Nights`",
inline=False)
embed.add_field(
name="\u200b",
value="<:EnsoBros:722360289345011743> : `Enso Bros Podcasts`",
inline=False)
embed.add_field(
name="\u200b",
value="<:GameNights:722502073769525268> : `Game Nights`",
inline=False)
# Send embed to #self-roles
await channel.send(embed=embed)
# ~rules command allows for an embed message about the leveled roles and xp system
@command(name="rules", aliases=["Rules"])
@cooldown(1, 5, BucketType.user)
async def rules(self, ctx):
# Allowing the bot to dm the user
author = ctx.author
# Define Izzy's roles ID
@ -194,7 +233,6 @@ class CustomHelp(commands.Cog):
# ~roles command allows for an embed message about roles
@command(name="roles", aliases=["Roles"])
async def roles(self, ctx):
# Allowing the bot to dm the user
author = ctx.author

Loading…
Cancel
Save