From 1cb7712884a1442f1b7c734e08e4d5d0c39d31bc Mon Sep 17 00:00:00 2001 From: xenofem Date: Tue, 29 Sep 2020 10:00:05 -0400 Subject: [PATCH] API change made us try and fail to actually mention blocked users in DMs, don't do that --- waggle-dance.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/waggle-dance.py b/waggle-dance.py index 36cbd63..1e5edbf 100755 --- a/waggle-dance.py +++ b/waggle-dance.py @@ -221,22 +221,22 @@ async def handle_dm(message): discriminator = match.group(2) matching_users = [u for u in client.users if u.name == name and u.discriminator == discriminator] if len(matching_users) == 0: - await message.channel.send("sorry, I can't find user {}, it looks like they're not in any of the discords I'm in".format(handle)) + await message.channel.send("sorry, I can't find user {}, it looks like they're not in any of the discords I'm in".format(handle), allowed_mentions=discord.AllowedMentions.none()) else: target = matching_users[0].id if target in get_blocks().get(requester, []): - await message.channel.send("removing {} from your list of blocked users for pollination".format(handle)) + await message.channel.send("removing {} from your list of blocked users for pollination".format(handle), allowed_mentions=discord.AllowedMentions.none()) remove_block(requester, target) else: - await message.channel.send("adding {} to your list of blocked users for pollination".format(handle)) + await message.channel.send("adding {} to your list of blocked users for pollination".format(handle), allowed_mentions=discord.AllowedMentions.none()) add_block(requester, target) blocks = get_blocks().get(requester, []) if len(blocks) == 0: await message.channel.send("you currently don't have anyone blocked for pollination") else: - await message.channel.send("your current list of blocked users for pollination is:\n{}".format('\n'.join('@{}#{}'.format(u.name, u.discriminator) for u in [client.get_user(uid) for uid in blocks] if u is not None))) - await message.channel.send("to block or unblock a user, DM me their handle, like @creep#0000. to see this message and your list of blocked users, DM me something random. buzz buzz!") + await message.channel.send("your current list of blocked users for pollination is:\n{}".format('\n'.join('@{}#{}'.format(u.name, u.discriminator) for u in [client.get_user(uid) for uid in blocks] if u is not None)), allowed_mentions=discord.AllowedMentions.none()) + await message.channel.send("to block or unblock a user, DM me their handle, like @creep#0000. to see this message and your list of blocked users, DM me something random. buzz buzz!", allowed_mentions=discord.AllowedMentions.none()) @client.event async def on_ready():