diff --git a/bot/plugins/useless.py b/bot/plugins/useless.py index b38235c..f15521c 100644 --- a/bot/plugins/useless.py +++ b/bot/plugins/useless.py @@ -125,7 +125,7 @@ class Useless(DatabasePlugin): @command def waifu(self, mask: IrcString, target: IrcString, args: DocOptDict): - """Get waifu for a user + """Get waifu for a user (set with prefixing the user with =) %%waifu [...] """ @@ -158,14 +158,14 @@ class Useless(DatabasePlugin): WHERE lower(nick) = lower(%s) ''', [nick]) - result = self.cur.fetchone() + result = self.cur.fetchone()['waifu'] - if result and result['waifu']: - return '\x02[Waifu]\x02 {}: {}'.format(nick, result['waifu']) + if result: + return '\x02[Waifu]\x02 {}: {}'.format(nick, result) @command def husbando(self, mask: IrcString, target: IrcString, args: DocOptDict): - """Get husbando for a user + """Get husbando for a user (set with prefixing the user with =) %%husbando [...] """ @@ -198,10 +198,10 @@ class Useless(DatabasePlugin): WHERE lower(nick) = lower(%s) ''', [nick]) - result = self.cur.fetchone() + result = self.cur.fetchone()['husbando'] - if result and result['husbando']: - return '\x02[Husbando]\x02 {}: {}'.format(nick, result['husbando']) + if result: + return '\x02[Husbando]\x02 {}: {}'.format(nick, result) @command def storyofpomfface(self, mask: IrcString, target: IrcString,