Log command attempts on channels
Not actually needed, but helps me sleep at night
This commit is contained in:
parent
81aa5914aa
commit
472dacb9bd
4
ubot.py
4
ubot.py
@ -90,6 +90,10 @@ async def edit(event):
|
||||
if msg.startswith('.sh'):
|
||||
if event.is_channel and not event.is_group:
|
||||
await event.edit('Sorry, this is not allowed!')
|
||||
rpl = f'Someone attempted to execute a command on a channel.\n'
|
||||
rpl += f'Message: `{msg}`\n'
|
||||
rpl += f'Execution aborted.\n'
|
||||
await client.send_message('me', rpl)
|
||||
return
|
||||
|
||||
cmd = msg.split(' ', 1)[1]
|
||||
|
Loading…
x
Reference in New Issue
Block a user