mirror of
https://github.com/RPCS3/discord-bot.git
synced 2024-12-02 16:06:51 +00:00
do case insensetive piracy checks
do not execute piracy subcommands on public channels
This commit is contained in:
parent
75f575c9dd
commit
e728e5b1aa
4
bot.py
4
bot.py
@ -135,7 +135,7 @@ async def on_message(message: Message):
|
||||
|
||||
async def piracy_check(message: Message):
|
||||
for trigger in piracy_strings:
|
||||
if trigger in message.content:
|
||||
if trigger.lower() in message.content.lower(): #we should .lower() on trigger add ideally
|
||||
try:
|
||||
# permissions = message.channel.permissions_for(bot.user)
|
||||
# if permissions.manage_messages:
|
||||
@ -575,6 +575,8 @@ async def piracy(ctx: Context):
|
||||
if await is_private_channel(ctx):
|
||||
if ctx.invoked_subcommand is None:
|
||||
await ctx.send('Invalid piracy command passed...')
|
||||
else:
|
||||
ctx.invoked_subcommand = None
|
||||
|
||||
|
||||
# noinspection PyShadowingBuiltins
|
||||
|
Loading…
Reference in New Issue
Block a user