Added doc for setting waifu/husbando)

This commit is contained in:
mrhanky 2017-08-22 15:19:57 +02:00
parent 9d1602046d
commit cc279c39e0
No known key found for this signature in database
GPG Key ID: 67D772C481CB41B8

View File

@ -125,7 +125,7 @@ class Useless(DatabasePlugin):
@command @command
def waifu(self, mask: IrcString, target: IrcString, args: DocOptDict): 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 [<nick>...] %%waifu [<nick>...]
""" """
@ -158,14 +158,14 @@ class Useless(DatabasePlugin):
WHERE WHERE
lower(nick) = lower(%s) lower(nick) = lower(%s)
''', [nick]) ''', [nick])
result = self.cur.fetchone() result = self.cur.fetchone()['waifu']
if result and result['waifu']: if result:
return '\x02[Waifu]\x02 {}: {}'.format(nick, result['waifu']) return '\x02[Waifu]\x02 {}: {}'.format(nick, result)
@command @command
def husbando(self, mask: IrcString, target: IrcString, args: DocOptDict): 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 [<nick>...] %%husbando [<nick>...]
""" """
@ -198,10 +198,10 @@ class Useless(DatabasePlugin):
WHERE WHERE
lower(nick) = lower(%s) lower(nick) = lower(%s)
''', [nick]) ''', [nick])
result = self.cur.fetchone() result = self.cur.fetchone()['husbando']
if result and result['husbando']: if result:
return '\x02[Husbando]\x02 {}: {}'.format(nick, result['husbando']) return '\x02[Husbando]\x02 {}: {}'.format(nick, result)
@command @command
def storyofpomfface(self, mask: IrcString, target: IrcString, def storyofpomfface(self, mask: IrcString, target: IrcString,