API change made us try and fail to actually mention blocked users in DMs, don't do that
This commit is contained in:
parent
9e9c2cde1c
commit
1cb7712884
|
@ -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():
|
||||
|
|
Loading…
Reference in a new issue