aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Anubhav1603 <[email protected]>2020-10-07 20:07:55 +0530
committerGravatar Anubhav1603 <[email protected]>2020-10-07 20:07:55 +0530
commitb7bdf7a3782dac65da0fbfc47b4f0e786aac6950 (patch)
tree770df183ec727b8be7127933a3646853ac229270
parentMerge branch 'master' into bug_ec (diff)
added typing.tuple
-rw-r--r--bot/exts/evergreen/emoji_count.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/bot/exts/evergreen/emoji_count.py b/bot/exts/evergreen/emoji_count.py
index 82ee1798..6b56afc3 100644
--- a/bot/exts/evergreen/emoji_count.py
+++ b/bot/exts/evergreen/emoji_count.py
@@ -2,6 +2,7 @@ import datetime
import logging
import random
from collections import defaultdict
+from typing import Tuple
import discord
from discord.ext import commands
@@ -19,7 +20,7 @@ class EmojiCount(commands.Cog):
self.bot = bot
@staticmethod
- def embed_builder(emoji: dict) -> [discord.Embed, str]:
+ def embed_builder(emoji: dict) -> Tuple[discord.Embed, str]:
"""Generates an embed with the emoji names and count."""
embed = discord.Embed(
color=Colours.orange,
@@ -44,7 +45,7 @@ class EmojiCount(commands.Cog):
return embed, msg
@staticmethod
- def generate_invalid_embed(ctx: commands.Context) -> [discord.Embed, str]:
+ def generate_invalid_embed(ctx: commands.Context) -> Tuple[discord.Embed, str]:
"""Generates error embed."""
embed = discord.Embed(
color=Colours.soft_red,
@@ -56,7 +57,7 @@ class EmojiCount(commands.Cog):
for emoji in ctx.guild.emojis:
emoji_dict[emoji.name.split("_")[0]].append(emoji)
- error_comp = ', '.join(emoji_category for emoji_category in emoji_dict)
+ error_comp = ', '.join(emoji_dict)
msg.append(f"These are the valid categories\n```{error_comp}```")
return embed, msg