Skip to content

Commit

Permalink
fix emote react; disable word detector
Browse files Browse the repository at this point in the history
Signed-off-by: Will Killian <[email protected]>
  • Loading branch information
willkill07 committed May 6, 2024
1 parent 95f1de3 commit 1ddd974
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 30 deletions.
57 changes: 28 additions & 29 deletions cogs/emote_reactor.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,32 +6,32 @@
from discord import ui

EMOTE_LOOKUP = {
"a": ["", "'"],
"b": ["", "'"],
"c": [""],
"d": [""],
"e": [""],
"f": [""],
"g": [""],
"h": [""],
"i": ["", "'ℹ"],
"j": [""],
"k": [""],
"l": [""],
"m": ["", "'Ⓜ"],
"n": [""],
"o": ["", "'"],
"p": ["", "'"],
"q": [""],
"r": [""],
"s": [""],
"t": [""],
"u": [""],
"v": [""],
"w": [""],
"x": [""],
"y": [""],
"z": [""],
"a": ["🇦", "🅰️"],
"b": ["🇧", "🅱️"],
"c": ["🇨"],
"d": ["🇩"],
"e": ["🇪"],
"f": ["🇫"],
"g": ["🇬"],
"h": ["🇭"],
"i": ["🇮", "ℹ️"],
"j": ["🇯"],
"k": ["🇰"],
"l": ["🇱"],
"m": ["🇲", "Ⓜ️"],
"n": ["🇳"],
"o": ["🇴", "🅾️"],
"p": ["🇵", "🅿️"],
"q": ["🇶"],
"r": ["🇷"],
"s": ["🇸"],
"t": ["🇹"],
"u": ["🇺"],
"v": ["🇻"],
"w": ["🇼"],
"x": ["🇽"],
"y": ["🇾"],
"z": ["🇿"],
"1": ["1️⃣"],
"2": ["2️⃣"],
"3": ["3️⃣"],
Expand All @@ -57,8 +57,8 @@ async def on_submit(self, interaction: discord.Interaction):
emotes = []
try:
for c in self.reactor.value:
counts[c] += 1
emotes.append(EMOTE_LOOKUP[c][counts[c]])
counts[c] += 1
reactions = [self.message.add_reaction(e) for e in emotes]
await interaction.response.send_message(
"Successfully added emote reaction",
Expand All @@ -70,7 +70,7 @@ async def on_submit(self, interaction: discord.Interaction):
await r
except Exception as e:
await interaction.response.send_message(
f"the reaction string cannot be represented using the characters specified",
f"the reaction string cannot be represented using the characters specified {e}",
delete_after=15.0,
ephemeral=True,
)
Expand All @@ -97,4 +97,3 @@ async def emote_react(

async def setup(bot: commands.Bot):
await bot.add_cog(EmoteReact(bot))

3 changes: 2 additions & 1 deletion cogs/word_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,5 @@ async def removefilter(self, ctx, *words):
await self._remove(w.lower() for w in words)

async def setup(bot):
await bot.add_cog(WordDetectorCog(bot))
pass
# await bot.add_cog(WordDetectorCog(bot))

0 comments on commit 1ddd974

Please sign in to comment.