Compare commits
No commits in common. "82c7508517ed2f5612cfe3a8bfe512da928337fb" and "8abfc48ef51a122b21117ea764a357e3e4cf831d" have entirely different histories.
82c7508517
...
8abfc48ef5
|
|
@ -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,11 +18,17 @@ 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=MatrixRolesEmbed(), view=MatrixButtons())
|
||||
await channel.send(embed=LanguageRolesEmbed(), view=LanguageButtons())
|
||||
# await channel.send(embed=matrix_embed, view=MatrixButtons())
|
||||
# await channel.send(embed=language_embed, view=LanguageButtons())
|
||||
|
||||
|
||||
async def setup(bot):
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
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()
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
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()
|
||||
|
|
@ -21,7 +21,7 @@ class TwitchGameNotificationEmbed(Embed):
|
|||
self.add_field(name="Game", value=f"{stream_data["game_name"]}", inline=True)
|
||||
self.add_field(name="Viewers", value=f"{stream_data["viewer_count"]}", inline=True)
|
||||
tags = stream_data["tags"]
|
||||
if len(tags) > 5:
|
||||
tags = tags[:5]
|
||||
if len(tags) > 3:
|
||||
tags = tags[:3]
|
||||
tags.append('...')
|
||||
self.add_field(name="Tags", value=f"{", ".join(tags)}", inline=False)
|
||||
self.add_field(name="Tags", value=f"{", ".join(tags)}")
|
||||
Loading…
Reference in a new issue