have bot respond to role mentions too
This commit is contained in:
parent
e9889e28f1
commit
c4f04c80c5
|
@ -33,7 +33,10 @@ class MyClient(discord.Client):
|
|||
print('logged in as {0.user}'.format(self), file=sys.stderr)
|
||||
|
||||
async def on_message(self, message):
|
||||
if message.author == self.user or self.user not in message.mentions:
|
||||
if message.author == self.user:
|
||||
return
|
||||
|
||||
if self.user not in message.mentions and self.user not in [m for m in role.members for role in message.role_mentions]:
|
||||
return
|
||||
|
||||
await message.channel.send(gen_sentence())
|
||||
|
|
Loading…
Reference in a new issue