git://git.furryclan.net
/
furrycat
/
catbot.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
69a2911
)
Catch lack of read message history permission retrieving messages.
author
CMDR furrycat
<elite@furrycat.net>
Fri, 11 Nov 2016 09:47:52 +0000
(09:47 +0000)
committer
CMDR furrycat
<elite@furrycat.net>
Fri, 11 Nov 2016 09:47:52 +0000
(09:47 +0000)
plugin/developer/developer.py
patch
|
blob
|
history
diff --git
a/plugin/developer/developer.py
b/plugin/developer/developer.py
index
dff3282
..
3d23072
100644
(file)
--- a/
plugin/developer/developer.py
+++ b/
plugin/developer/developer.py
@@
-111,9
+111,12
@@
class Developer(object):
m = re.match(r'^\d+$', message_id)
if m is not None:
- result = yield from client.get_message(channel, message_id)
- if result is not None:
- return result
+ try:
+ result = yield from client.get_message(channel, message_id)
+ if result is not None:
+ return result
+ except discord.errors.Forbidden:
+ log.warning('Forbidden to retrieve message {} in {}.'.format(message_id, channel_id))
yield from bot.say(message.channel, 'Message?')
return None