Switching to asyncpg

release-1.0.0
DustyP 8 years ago
parent 618c3acf84
commit 450783b785

@ -86,8 +86,7 @@ class BotEvents:
if await self.bot.db_con.fetchval("select pg_filter from guild_config where guild_id = $1", ctx.guild.id): if await self.bot.db_con.fetchval("select pg_filter from guild_config where guild_id = $1", ctx.guild.id):
profane = 0 profane = 0
for word in await self.bot.db_con.fetchval('select profane_words from guild_config ' for word in await self.bot.db_con.fetchval('select profane_words from guild_config '
'where guild_id = %(id)s', 'where guild_id = $1', ctx.guild.id):
{'id': ctx.guild.id}):
word = word.strip() word = word.strip()
if word in ctx.content.lower(): if word in ctx.content.lower():
events_log.info(f'Found non PG word {word}') events_log.info(f'Found non PG word {word}')

Loading…
Cancel
Save