mirror of
https://github.com/myned/modufur.git
synced 2024-12-24 22:27:28 +00:00
Remove OS-dependent notifications
This commit is contained in:
parent
21dbd9a406
commit
dc0142a29e
3 changed files with 1 additions and 9 deletions
|
@ -37,7 +37,6 @@ class Bot:
|
||||||
# for task in loop:
|
# for task in loop:
|
||||||
# task.cancel()
|
# task.cancel()
|
||||||
print('\n< < < < < < < < < < < <\nD I S C O N N E C T E D\n< < < < < < < < < < < <\n')
|
print('\n< < < < < < < < < < < <\nD I S C O N N E C T E D\n< < < < < < < < < < < <\n')
|
||||||
# u.notify('D I S C O N N E C T E D')
|
|
||||||
await self.bot.logout()
|
await self.bot.logout()
|
||||||
|
|
||||||
@cmds.command(name=',restart', aliases=[',res', ',r'], hidden=True)
|
@cmds.command(name=',restart', aliases=[',res', ',r'], hidden=True)
|
||||||
|
@ -47,7 +46,6 @@ class Bot:
|
||||||
|
|
||||||
print('\n^ ^ ^ ^ ^ ^ ^ ^ ^ ^\nR E S T A R T I N G\n^ ^ ^ ^ ^ ^ ^ ^ ^ ^\n')
|
print('\n^ ^ ^ ^ ^ ^ ^ ^ ^ ^\nR E S T A R T I N G\n^ ^ ^ ^ ^ ^ ^ ^ ^ ^\n')
|
||||||
await self.bot.get_channel(u.config['info_channel']).send('**Restarting** \N{SLEEPING SYMBOL} . . .')
|
await self.bot.get_channel(u.config['info_channel']).send('**Restarting** \N{SLEEPING SYMBOL} . . .')
|
||||||
# u.notify('R E S T A R T I N G')
|
|
||||||
|
|
||||||
chantype = 'guild' if isinstance(ctx.channel, d.TextChannel) else 'private'
|
chantype = 'guild' if isinstance(ctx.channel, d.TextChannel) else 'private'
|
||||||
u.temp['startup'] = (chantype, ctx.channel.id if chantype == 'guild' else ctx.author.id, ctx.message.id)
|
u.temp['startup'] = (chantype, ctx.channel.id if chantype == 'guild' else ctx.author.id, ctx.message.id)
|
||||||
|
|
|
@ -156,7 +156,7 @@ async def on_error(error, *args, **kwargs):
|
||||||
|
|
||||||
u.temp.clear()
|
u.temp.clear()
|
||||||
u.dump(u.temp, 'temp/temp.pkl')
|
u.dump(u.temp, 'temp/temp.pkl')
|
||||||
# u.notify('E R R O R')
|
|
||||||
await bot.logout()
|
await bot.logout()
|
||||||
|
|
||||||
|
|
||||||
|
@ -191,7 +191,6 @@ async def on_command_error(ctx, error):
|
||||||
await bot.get_channel(u.config['info_channel']).send('**COMMAND ERROR** \N{WARNING SIGN} `{}` from {} in {}\n```\n{}```'.format(ctx.message.content, ctx.author.name, ctx.channel.mention if isinstance(ctx.channel, d.channel.TextChannel) else 'DMs', error))
|
await bot.get_channel(u.config['info_channel']).send('**COMMAND ERROR** \N{WARNING SIGN} `{}` from {} in {}\n```\n{}```'.format(ctx.message.content, ctx.author.name, ctx.channel.mention if isinstance(ctx.channel, d.channel.TextChannel) else 'DMs', error))
|
||||||
await exc.send_error(ctx, error)
|
await exc.send_error(ctx, error)
|
||||||
await u.add_reaction(ctx.message, '\N{WARNING SIGN}')
|
await u.add_reaction(ctx.message, '\N{WARNING SIGN}')
|
||||||
# u.notify('C O M M A N D E R R O R')
|
|
||||||
|
|
||||||
# @bot.event
|
# @bot.event
|
||||||
# async def on_command(ctx):
|
# async def on_command(ctx):
|
||||||
|
|
|
@ -20,11 +20,6 @@ from misc import exceptions as exc
|
||||||
print('\nPID : {}\n'.format(os.getpid()))
|
print('\nPID : {}\n'.format(os.getpid()))
|
||||||
|
|
||||||
|
|
||||||
# def notify(message):
|
|
||||||
# subprocess.run(['terminal-notifier', '-message', message, '-title',
|
|
||||||
# 'Modumind', '-activate', 'com.apple.Terminal', '-appIcon', 'icon.png', '-sound', 'Ping'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
|
||||||
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
with open('config.json') as infile:
|
with open('config.json') as infile:
|
||||||
config = jsn.load(infile)
|
config = jsn.load(infile)
|
||||||
|
|
Loading…
Reference in a new issue