mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-12-27 07:27:03 +01:00
Added commands I think
This commit is contained in:
parent
7ea167afcf
commit
13b2aade5e
@ -13,18 +13,6 @@ logging.getLogger('sqlalchemy')
|
||||
bot = commands.Bot(command_prefix=config['command-prefix'])
|
||||
database = DatabaseInterface(bot)
|
||||
|
||||
def run(self):
|
||||
try:
|
||||
bot.loop.run_until_complete(self.start(config["bot-token"]))
|
||||
except discord.errors.LoginFailure:
|
||||
print("Invalid bot token in config!")
|
||||
finally:
|
||||
try:
|
||||
self._cleanup()
|
||||
except Exception as e:
|
||||
print("Error in cleanup:", e)
|
||||
bot.loop.close()
|
||||
|
||||
def _cleanup(self):
|
||||
try:
|
||||
bot.loop.run_until_complete(self.logout())
|
||||
@ -198,4 +186,15 @@ async def kick(ctx, self):
|
||||
username = content[2][:content[2].find("#")] if "#" in content[2] else content[2]
|
||||
discriminator = int(content[2][content[2].find("#") + 1:]) if "#" in content[2] else None
|
||||
reason = await self.database.revoke_unauth_user_by_query(message.server.id, username, discriminator)
|
||||
await self.send_message(message.channel, message.author.mention + " " + reason)
|
||||
await self.send_message(message.channel, message.author.mention + " " + reason)
|
||||
|
||||
try:
|
||||
bot.loop.run_until_complete(bot.run(config["bot-token"]))
|
||||
except discord.errors.LoginFailure:
|
||||
print("Invalid bot token in config!")
|
||||
finally:
|
||||
try:
|
||||
self._cleanup()
|
||||
except Exception as e:
|
||||
print("Error in cleanup:", e)
|
||||
bot.loop.close()
|
Loading…
Reference in New Issue
Block a user