Made the last change on tag as well
This commit is contained in:
parent
d3a20edcf3
commit
280544b734
|
@ -125,7 +125,7 @@ class Core:
|
||||||
@commands.group(pass_context=True, invoke_without_command=True)
|
@commands.group(pass_context=True, invoke_without_command=True)
|
||||||
async def tag(self, ctx, tag: str):
|
async def tag(self, ctx, tag: str):
|
||||||
cursor = config.getCursor()
|
cursor = config.getCursor()
|
||||||
cursor.execute('use %s', (config.db_default,))
|
cursor.execute('use {}'.format(config.db_default))
|
||||||
cursor.execute('select * from tags where server_id=%s and tag=%s', (ctx.message.server.id, tag))
|
cursor.execute('select * from tags where server_id=%s and tag=%s', (ctx.message.server.id, tag))
|
||||||
result = cursor.fetchone()
|
result = cursor.fetchone()
|
||||||
if result is None:
|
if result is None:
|
||||||
|
@ -169,6 +169,6 @@ class Core:
|
||||||
await self.bot.say('I have just removed the tag {}'.format(tag))
|
await self.bot.say('I have just removed the tag {}'.format(tag))
|
||||||
config.closeConnection()
|
config.closeConnection()
|
||||||
|
|
||||||
|
!
|
||||||
def setup(bot):
|
def setup(bot):
|
||||||
bot.add_cog(Core(bot))
|
bot.add_cog(Core(bot))
|
||||||
|
|
Loading…
Reference in a new issue