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

Fix Attribute errors occurring during reaction message creation and system channel setting #55

Merged
merged 4 commits into from
Jan 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.2
2.1.3
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Reaction Light - Changelog
### 2.1.3
- Fix errors occuring during reaction-role message creation/editing ([#54](https://github.com/eibex/reaction-light/issues/54) closed by [#55](https://github.com/eibex/reaction-light/pull/55) by [Edwinexd](https://github.com/Edwinexd))

### 2.1.2
- Fix database errors resulting in guilds not being cleaned up

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Reaction Light - Discord Role Bot
[![Reaction Light 2.1.2](https://img.shields.io/badge/Reaction%20Light-2.1.2-yellow.svg)](https://github.com/eibex/reaction-light/blob/master/CHANGELOG.md)
[![Reaction Light 2.1.3](https://img.shields.io/badge/Reaction%20Light-2.1.3-yellow.svg)](https://github.com/eibex/reaction-light/blob/master/CHANGELOG.md)
[![Python 3.5.3+](https://img.shields.io/badge/python-3.5.3+-blue.svg)](#)
[![discord.py 1.5.0+](https://img.shields.io/badge/discord.py-1.5.0+-blue.svg)](#)

Expand Down
4 changes: 2 additions & 2 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ async def on_message(message):

server = await getguild(message.guild.id)
bot_user = server.get_member(bot.user.id)
bot_permissions = await getchannel(target_channel).permissions_for(
bot_permissions = (await getchannel(target_channel)).permissions_for(
bot_user
)
writable = bot_permissions.read_messages
Expand Down Expand Up @@ -989,7 +989,7 @@ async def set_systemchannel(ctx):

server = await getguild(guild_id)
bot_user = server.get_member(bot.user.id)
bot_permissions = await getchannel(system_channel).permissions_for(bot_user)
bot_permissions = (await getchannel(system_channel)).permissions_for(bot_user)
writable = bot_permissions.read_messages
readable = bot_permissions.view_channel
if not writable or not readable:
Expand Down