Revert to bot message if webhook failed to create SOMEHOW

This commit is contained in:
Jeremy Zhang 2019-01-08 09:14:59 +00:00
parent 0a0be1a83b
commit f50b57ff91

View File

@ -171,7 +171,10 @@ def get_channel_webhook_url(guild_id, channel_id):
"token": webhook["token"] "token": webhook["token"]
} }
webhook = discord_api.create_webhook(channel_id, name) webhook = discord_api.create_webhook(channel_id, name)
if webhook and "content" in webhook:
return webhook["content"] return webhook["content"]
else:
return None
def get_all_users(guild_id): def get_all_users(guild_id):
users = redisqueue.list_guild_members(guild_id) users = redisqueue.list_guild_members(guild_id)