Skip to content

Commit

Permalink
revert suppressing in send() as per Pycord-Development/pycord#1674
Browse files Browse the repository at this point in the history
  • Loading branch information
honzajavorek committed Oct 6, 2022
1 parent 98c8436 commit 57557a6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions juniorguru/sync/intro.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
logger = loggers.get(__name__)


@sync_task(club_content_task)
@sync_task() # club_content_task
def main():
run_discord_task('juniorguru.sync.intro.discord_task')

Expand Down Expand Up @@ -123,7 +123,8 @@ async def welcome(channel, message, moderators):
await welcome_discord_message.edit(content=content, suppress=True)
except IndexError:
logger_m.debug("Sending welcome message")
await thread.send(content=content, suppress=True)
welcome_discord_message = await thread.send(content=content)
await welcome_discord_message.edit(suppress=True)

logger_m.debug("Analyzing if all moderators are involved")
thread_members_ids = [member.id for member in (thread.members or await thread.fetch_members())]
Expand Down
5 changes: 3 additions & 2 deletions juniorguru/sync/li_group.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async def discord_task(client):
logger.info('Last message is more than one month old!')
if DISCORD_MUTATIONS_ENABLED:
channel = await client.fetch_channel(LI_GROUP_CHANNEL)
await channel.send(content=(
message = await channel.send(content=(
"<:linkedin:915267970752712734> Nezapomeň, že můžeš svou LinkedIn síť rozšířit o členy klubu. "
"Přidej se do naší skupiny <https://www.linkedin.com/groups/13988090/>, "
"díky které se pak můžeš snadno propojit s ostatními (a oni s tebou). "
Expand All @@ -36,6 +36,7 @@ async def discord_task(client):
"👀 Nevíme, jestli ti logo na profilu přidá nějaký kredit u recruiterů, ale vyloučeno to není! "
"Minimálně jako poznávací znamení mezi námi by to zafungovat mohlo. "
"Něco jako „Jé, koukám, že ty jsi taky chodila do skauta? Chodíš ještě? Jakou máš přezdívku?“"
), suppress=True)
))
await message.edit(suppress=True)
else:
logger.warning('Discord mutations not enabled')

0 comments on commit 57557a6

Please sign in to comment.