Version 2.2

New features
- Polls will now automatically activate or close and post themselves to the specified channel
- Improved ❔ functionality: Now lists the current votes for each options
- pm!cmd feature is enabled again with more error logging
- Title and options now support most UTF-8 characters, meaning you can put emojis and special characters in your poll

Changes and Fixes
- Improved performance and scalability. Should feel a lot more responsive now
- Fixed formatting issues for closed polls
- Export now shows server specific nickname is applicable
- Users can no longer create polls in channels where they don't have "send message" permissions
This commit is contained in:
Matthias Nadler committed 2019-03-23 11:47:10 +01:00
1 parent 6189aaf39a
commit 5ae6a31a20
6 files changed
+258 -163

No files matched your search

+5 -1
View File
@@ -100,8 +100,12 @@ async def ask_for_channel(bot, server, message):
if str(message.channel.type) == 'text':
return message.channel
# build channel list that the user is allowed to send messages to
user = message.author
member = server.get_member(user.id)
channel_list = [c for c in server.channels if str(c.type) == 'text' and c.permissions_for(member).send_messages]
# if exactly 1 channel, return it
channel_list = [c for c in server.channels if str(c.type) == 'text']
if channel_list.__len__() == 1:
return channel_list[0]