mirror of https://github.com/skygpu/skynet.git
add block on any channel but skynet
parent
609c741ae9
commit
06827a0e70
|
@ -439,7 +439,7 @@ def telegram(
|
||||||
@run.command()
|
@run.command()
|
||||||
@click.option('--loglevel', '-l', default='INFO', help='logging level')
|
@click.option('--loglevel', '-l', default='INFO', help='logging level')
|
||||||
@click.option(
|
@click.option(
|
||||||
'--account', '-a', default=None)
|
'--account', '-a', default='discord')
|
||||||
@click.option(
|
@click.option(
|
||||||
'--permission', '-p', default='active')
|
'--permission', '-p', default='active')
|
||||||
@click.option(
|
@click.option(
|
||||||
|
|
|
@ -47,6 +47,11 @@ class DiscordBot(commands.Bot):
|
||||||
print(self.user.id)
|
print(self.user.id)
|
||||||
print("==============")
|
print("==============")
|
||||||
|
|
||||||
|
async def on_message(self, message):
|
||||||
|
if message.channel.name != 'skynet':
|
||||||
|
return
|
||||||
|
await self.process_commands(message)
|
||||||
|
|
||||||
async def on_command_error(self, ctx, error):
|
async def on_command_error(self, ctx, error):
|
||||||
if isinstance(error, commands.MissingRequiredArgument):
|
if isinstance(error, commands.MissingRequiredArgument):
|
||||||
await ctx.send('You missed a required argument, please try again.')
|
await ctx.send('You missed a required argument, please try again.')
|
||||||
|
|
Loading…
Reference in New Issue