Fix not being able to send multiple emotes properly at once
This commit is contained in:
parent
71b6d0cd00
commit
36cd593cdc
1 changed files with 6 additions and 3 deletions
3
main.py
3
main.py
|
@ -141,7 +141,10 @@ class MatrixClient(nio.AsyncClient):
|
||||||
|
|
||||||
guild = channel.guild
|
guild = channel.guild
|
||||||
|
|
||||||
|
added_emotes = []
|
||||||
for emote in emotes:
|
for emote in emotes:
|
||||||
|
if emote not in added_emotes:
|
||||||
|
added_emotes.append(emote)
|
||||||
emote_ = discord.utils.get(guild.emojis, name=emote)
|
emote_ = discord.utils.get(guild.emojis, name=emote)
|
||||||
if emote_:
|
if emote_:
|
||||||
message = message.replace(f":{emote}:", str(emote_))
|
message = message.replace(f":{emote}:", str(emote_))
|
||||||
|
|
Loading…
Reference in a new issue