Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Update Docker and CI #2432

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix messages deleting even when set not to
BabyBoySnow authored and pythoninthegrass committed Oct 18, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 1510a4a3de785a65bf19b91d1346b97d57d35597
11 changes: 6 additions & 5 deletions musicbot/bot.py
Original file line number Diff line number Diff line change
@@ -988,13 +988,14 @@ async def safe_send_message(self, dest, content, **kwargs):
)

finally:
if msg and expire_in:
asyncio.ensure_future(self._wait_delete_msg(msg, expire_in))
if self.config.delete_messages:
if msg and expire_in:
asyncio.ensure_future(self._wait_delete_msg(msg, expire_in))

if also_delete and isinstance(also_delete, discord.Message):
asyncio.ensure_future(self._wait_delete_msg(also_delete, expire_in))
if also_delete and isinstance(also_delete, discord.Message):
asyncio.ensure_future(self._wait_delete_msg(also_delete, expire_in))

return msg
return msg

async def safe_delete_message(self, message, *, quiet=False):
lfunc = log.debug if quiet else log.warning