mirror of
https://github.com/myned/modufur.git
synced 2024-12-25 06:37:29 +00:00
utils.config
This commit is contained in:
parent
81d8a31ea6
commit
a9178b0204
1 changed files with 6 additions and 7 deletions
|
@ -19,17 +19,16 @@ nl = re.compile('\n')
|
||||||
|
|
||||||
class Bot:
|
class Bot:
|
||||||
|
|
||||||
def __init__(self, bot, config):
|
def __init__(self, bot):
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
self.config = config
|
|
||||||
|
|
||||||
# Close connection to Discord - immediate offline
|
# Close connection to Discord - immediate offline
|
||||||
@commands.command(name=',die', aliases=[',d'], brief='Kills the bot', description='BOT OWNER ONLY\nCloses the connection to Discord', hidden=True)
|
@commands.command(name=',die', aliases=[',d'], brief='Kills the bot', description='BOT OWNER ONLY\nCloses the connection to Discord', hidden=True)
|
||||||
@commands.is_owner()
|
@commands.is_owner()
|
||||||
@checks.del_ctx()
|
@checks.del_ctx()
|
||||||
async def die(self, ctx):
|
async def die(self, ctx):
|
||||||
if isinstance(self.bot.get_channel(self.config['startup_channel']), d.TextChannel):
|
if isinstance(self.bot.get_channel(u.config['startup_channel']), d.TextChannel):
|
||||||
await self.bot.get_channel(self.config['shutdown_channel']).send('**Shutting down...** 🌙')
|
await self.bot.get_channel(u.config['shutdown_channel']).send('**Shutting down...** 🌙')
|
||||||
# loop = self.bot.loop.all_tasks()
|
# loop = self.bot.loop.all_tasks()
|
||||||
# for task in loop:
|
# for task in loop:
|
||||||
# task.cancel()
|
# task.cancel()
|
||||||
|
@ -45,8 +44,8 @@ class Bot:
|
||||||
async def restart(self, ctx):
|
async def restart(self, ctx):
|
||||||
print('RESTARTING')
|
print('RESTARTING')
|
||||||
print('-------')
|
print('-------')
|
||||||
if isinstance(self.bot.get_channel(self.config['startup_channel']), d.TextChannel):
|
if isinstance(self.bot.get_channel(u.config['startup_channel']), d.TextChannel):
|
||||||
await self.bot.get_channel(self.config['shutdown_channel']).send('**Restarting...** 💤')
|
await self.bot.get_channel(u.config['shutdown_channel']).send('**Restarting...** 💤')
|
||||||
# loop = self.bot.loop.all_tasks()
|
# loop = self.bot.loop.all_tasks()
|
||||||
# for task in loop:
|
# for task in loop:
|
||||||
# task.cancel()
|
# task.cancel()
|
||||||
|
@ -60,7 +59,7 @@ class Bot:
|
||||||
@commands.is_owner()
|
@commands.is_owner()
|
||||||
@checks.del_ctx()
|
@checks.del_ctx()
|
||||||
async def invite(self, ctx):
|
async def invite(self, ctx):
|
||||||
await ctx.send('🔗 https://discordapp.com/oauth2/authorize?&client_id={}&scope=bot&permissions={}'.format(self.config['client_id'], self.config['permissions']), delete_after=10)
|
await ctx.send('🔗 https://discordapp.com/oauth2/authorize?&client_id={}&scope=bot&permissions={}'.format(u.config['client_id'], u.config['permissions']), delete_after=10)
|
||||||
|
|
||||||
@commands.command(aliases=['presence', 'game'], hidden=True)
|
@commands.command(aliases=['presence', 'game'], hidden=True)
|
||||||
@commands.is_owner()
|
@commands.is_owner()
|
||||||
|
|
Loading…
Reference in a new issue