diff --git a/cogs/roles.py b/cogs/roles.py index 8448984..9a3589d 100644 --- a/cogs/roles.py +++ b/cogs/roles.py @@ -1,6 +1,6 @@ -import discord -from discord import Embed from discord.ext import commands +from embeds.MatrixRolesEmbed import MatrixRolesEmbed +from embeds.LanguageRolesEmbed import LanguageRolesEmbed from libs.Channels import Channels from libs.Guilds import Guilds from libs.Cog import Cog @@ -18,17 +18,11 @@ class RolesCog(Cog): async def on_ready(self): guild = await Guilds().get_guild(self.bot) channel = await Channels().get_channel(guild, "add-roles") - matrix_embed = Embed(title="Matrix Roles", color=discord.Color.purple(), description="Please select your choice between these two roles. " - "\nClick to add. Click again to remove. " - "\nAlso, clicking on one of them will remove the other, if you have it. " - "\n(Clicking Matrix Penguins, will remove Matrix-Refuser Penguins and add Matrix Penguins).") - language_embed = Embed(title="Language Roles", color=discord.Color.purple(), description="Please select your choice of languages to be associated with. " - "\nClick to add. Click again to remove.") if channel is not None: await channel.purge() - # await channel.send(embed=matrix_embed, view=MatrixButtons()) - # await channel.send(embed=language_embed, view=LanguageButtons()) + await channel.send(embed=MatrixRolesEmbed(), view=MatrixButtons()) + await channel.send(embed=LanguageRolesEmbed(), view=LanguageButtons()) async def setup(bot): diff --git a/embeds/LanguageRolesEmbed.py b/embeds/LanguageRolesEmbed.py new file mode 100644 index 0000000..7854625 --- /dev/null +++ b/embeds/LanguageRolesEmbed.py @@ -0,0 +1,15 @@ +import discord +from discord import Embed + + +class LanguageRolesEmbed(Embed): + + def __init__(self): + super().__init__() + self.title = "Language Roles" + self.description = ("Please select your choice of languages to be associated with." + "\nThese roles provide no functionality other than being alerted when it is tagged." + "\nThis is mainly for when someone shares information about the programming language" + " or is in need of help and asking a question") + self.add_field(name="Instructions", value="Click to add. Click again to remove.", inline=False) + self.color = discord.Color.purple() \ No newline at end of file diff --git a/embeds/MatrixRolesEmbed.py b/embeds/MatrixRolesEmbed.py new file mode 100644 index 0000000..495a262 --- /dev/null +++ b/embeds/MatrixRolesEmbed.py @@ -0,0 +1,19 @@ +import discord +from discord import Embed + + +class MatrixRolesEmbed(Embed): + + def __init__(self): + super().__init__() + self.title = "Matrix Roles" + self.description = ("Please select your choice between these two roles. " + "\nAlso, clicking on one of them will remove the other, if you have it. " + "\n(Clicking Matrix Penguins, will remove Matrix-Refuser Penguins and add Matrix Penguins).") + self.add_field(name="Instructions", value="Click to add. Click again to remove.", inline=False) + + self.add_field(name="Matrix Penguins", value="By accepting this role, you will be alerted whenever someone tags the role in one of the Tech channels", inline=True) + self.add_field(name="Matrix-Refuser Penguins", + value="By accepting this role, all of the Techie/Geeky channels will be hidden, and you can just enjoy the basic channels, participating in polls, etc", + inline=True) + self.color = discord.Color.purple() \ No newline at end of file