Removed DocOptDict alias
This commit is contained in:
parent
c9f0c1b616
commit
467c2139ed
|
@ -2,8 +2,7 @@
|
||||||
import logging
|
import logging
|
||||||
|
|
||||||
import irc3
|
import irc3
|
||||||
# noinspection PyPackageRequirements
|
from docopt import Dict
|
||||||
from docopt import Dict as DocOptDict
|
|
||||||
from irc3.plugins.command import command
|
from irc3.plugins.command import command
|
||||||
from irc3.utils import IrcString
|
from irc3.utils import IrcString
|
||||||
|
|
||||||
|
@ -13,8 +12,7 @@ logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
@command(permission='admin', show_in_help_list=False)
|
@command(permission='admin', show_in_help_list=False)
|
||||||
def reload(bot: irc3.IrcBot, mask: IrcString, target: IrcString,
|
def reload(bot: irc3.IrcBot, mask: IrcString, target: IrcString, args: Dict):
|
||||||
args: DocOptDict):
|
|
||||||
"""Reloads a plugin or the whole bot.
|
"""Reloads a plugin or the whole bot.
|
||||||
|
|
||||||
%%reload [<plugin>]
|
%%reload [<plugin>]
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import irc3
|
import irc3
|
||||||
import requests
|
import requests
|
||||||
from docopt import Dict as DocOptDict
|
from docopt import Dict
|
||||||
from irc3.plugins.command import command
|
from irc3.plugins.command import command
|
||||||
from irc3.utils import IrcString
|
from irc3.utils import IrcString
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ class Coins(Plugin):
|
||||||
}
|
}
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def btc(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def btc(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Gets the Bitcoin values from cryptowatch.
|
"""Gets the Bitcoin values from cryptowatch.
|
||||||
|
|
||||||
%%btc [<currency>]
|
%%btc [<currency>]
|
||||||
|
@ -29,14 +29,14 @@ class Coins(Plugin):
|
||||||
return self.cryptowat_summary('btc', args)
|
return self.cryptowat_summary('btc', args)
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def eth(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def eth(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Gets the Ethereum values from cryptowatch.
|
"""Gets the Ethereum values from cryptowatch.
|
||||||
|
|
||||||
%%eth [<currency>]
|
%%eth [<currency>]
|
||||||
"""
|
"""
|
||||||
return self.cryptowat_summary('eth', args)
|
return self.cryptowat_summary('eth', args)
|
||||||
|
|
||||||
def cryptowat_summary(self, crypto: str, args: DocOptDict):
|
def cryptowat_summary(self, crypto: str, args: Dict):
|
||||||
currency = args.get('<currency>', 'usd')
|
currency = args.get('<currency>', 'usd')
|
||||||
|
|
||||||
if currency not in self.CURRENCIES or crypto == currency:
|
if currency not in self.CURRENCIES or crypto == currency:
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import time
|
import time
|
||||||
|
|
||||||
import irc3
|
import irc3
|
||||||
from docopt import Dict as DocOptDict
|
from docopt import Dict
|
||||||
from irc3.plugins.command import command
|
from irc3.plugins.command import command
|
||||||
from irc3.utils import IrcString
|
from irc3.utils import IrcString
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ class CTCP(Plugin):
|
||||||
def _ctcp(self, name: str, nick: str, reply: str):
|
def _ctcp(self, name: str, nick: str, reply: str):
|
||||||
return '\x02[{}]\x02 {}: {}'.format(name.upper(), nick, reply)
|
return '\x02[{}]\x02 {}: {}'.format(name.upper(), nick, reply)
|
||||||
|
|
||||||
async def ctcp(self, name: str, mask: IrcString, args: DocOptDict):
|
async def ctcp(self, name: str, mask: IrcString, args: Dict):
|
||||||
nick = args.get('<nick>', mask.nick)
|
nick = args.get('<nick>', mask.nick)
|
||||||
data = await self.bot.ctcp_async(nick, name.upper(), self.TIMEOUT)
|
data = await self.bot.ctcp_async(nick, name.upper(), self.TIMEOUT)
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ class CTCP(Plugin):
|
||||||
return self._ctcp(name, nick, reply)
|
return self._ctcp(name, nick, reply)
|
||||||
|
|
||||||
@command
|
@command
|
||||||
async def ping(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
async def ping(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Sends ping via CTCP to user and sends the time needed
|
"""Sends ping via CTCP to user and sends the time needed
|
||||||
|
|
||||||
%%ping [<nick>]
|
%%ping [<nick>]
|
||||||
|
@ -58,7 +58,7 @@ class CTCP(Plugin):
|
||||||
return self._ctcp('ping', nick, reply)
|
return self._ctcp('ping', nick, reply)
|
||||||
|
|
||||||
@command
|
@command
|
||||||
async def time(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
async def time(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Gets the client time from nick via CTCP
|
"""Gets the client time from nick via CTCP
|
||||||
|
|
||||||
%%time [<nick>]
|
%%time [<nick>]
|
||||||
|
@ -66,7 +66,7 @@ class CTCP(Plugin):
|
||||||
return await self.ctcp('time', mask, args)
|
return await self.ctcp('time', mask, args)
|
||||||
|
|
||||||
@command
|
@command
|
||||||
async def ver(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
async def ver(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Gets the client version from nick via CTCP
|
"""Gets the client version from nick via CTCP
|
||||||
|
|
||||||
%%ver [<nick>]
|
%%ver [<nick>]
|
||||||
|
|
|
@ -3,7 +3,7 @@ from urllib.parse import urlparse
|
||||||
|
|
||||||
import irc3
|
import irc3
|
||||||
import requests
|
import requests
|
||||||
from docopt import Dict as DocOptDict
|
from docopt import Dict
|
||||||
from irc3.plugins.command import command
|
from irc3.plugins.command import command
|
||||||
from irc3.utils import IrcString
|
from irc3.utils import IrcString
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@ class Useless(DatabasePlugin):
|
||||||
'bot.plugins.storage']
|
'bot.plugins.storage']
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def isup(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def isup(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Checks if a address is up.
|
"""Checks if a address is up.
|
||||||
|
|
||||||
%%isup <address>
|
%%isup <address>
|
||||||
|
|
|
@ -3,7 +3,7 @@ import random
|
||||||
|
|
||||||
import irc3
|
import irc3
|
||||||
import feedparser
|
import feedparser
|
||||||
from docopt import Dict as DocOptDict
|
from docopt import Dict
|
||||||
from irc3.plugins.command import command
|
from irc3.plugins.command import command
|
||||||
from irc3.utils import IrcString
|
from irc3.utils import IrcString
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ class Linux(Plugin):
|
||||||
self.bot.privmsg(target, GNU_LINUX)
|
self.bot.privmsg(target, GNU_LINUX)
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def kernel(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def kernel(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Get Linux kernel releases.
|
"""Get Linux kernel releases.
|
||||||
|
|
||||||
%%kernel
|
%%kernel
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import irc3
|
import irc3
|
||||||
|
|
||||||
from docopt import Dict as DocOptDict
|
from docopt import Dict
|
||||||
from irc3.plugins.command import command
|
from irc3.plugins.command import command
|
||||||
from irc3.utils import IrcString
|
from irc3.utils import IrcString
|
||||||
from psycopg2 import Error
|
from psycopg2 import Error
|
||||||
|
@ -16,7 +16,7 @@ class McManiac(DatabasePlugin):
|
||||||
'bot.plugins.storage']
|
'bot.plugins.storage']
|
||||||
|
|
||||||
@command(options_first=True)
|
@command(options_first=True)
|
||||||
def mcmaniac(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def mcmaniac(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Get a random McManiaC or by index.
|
"""Get a random McManiaC or by index.
|
||||||
|
|
||||||
%%mcmaniac [<index>]
|
%%mcmaniac [<index>]
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import re
|
import re
|
||||||
|
|
||||||
import irc3
|
import irc3
|
||||||
from docopt import Dict as DocOptDict
|
from docopt import Dict
|
||||||
from irc3.plugins.command import command
|
from irc3.plugins.command import command
|
||||||
from irc3.utils import IrcString
|
from irc3.utils import IrcString
|
||||||
from psycopg2 import Error
|
from psycopg2 import Error
|
||||||
|
@ -61,7 +61,7 @@ class Quotes(DatabasePlugin):
|
||||||
'''.format(order=order), [nick, index])
|
'''.format(order=order), [nick, index])
|
||||||
|
|
||||||
@command(options_first=True)
|
@command(options_first=True)
|
||||||
def q(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def q(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Get, add or delete quotes for an user.
|
"""Get, add or delete quotes for an user.
|
||||||
|
|
||||||
%%q <cmd> <nick> <quote>...
|
%%q <cmd> <nick> <quote>...
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
import random
|
import random
|
||||||
|
|
||||||
import irc3
|
import irc3
|
||||||
from docopt import Dict as DocOptDict
|
from docopt import Dict
|
||||||
from irc3.plugins.command import command
|
from irc3.plugins.command import command
|
||||||
from irc3.utils import IrcString
|
from irc3.utils import IrcString
|
||||||
from psycopg2 import Error
|
from psycopg2 import Error
|
||||||
|
@ -16,7 +16,7 @@ class Rape(DatabasePlugin):
|
||||||
'bot.plugins.storage']
|
'bot.plugins.storage']
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def owe(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def owe(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Shows how much a nick owes.
|
"""Shows how much a nick owes.
|
||||||
|
|
||||||
%%owe [<nick>]
|
%%owe [<nick>]
|
||||||
|
@ -44,7 +44,7 @@ class Rape(DatabasePlugin):
|
||||||
return '{nick} owes: \x03{fines}\x03'.format(nick=nick, fines=fines)
|
return '{nick} owes: \x03{fines}\x03'.format(nick=nick, fines=fines)
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def rape(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def rape(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Rapes a nick and eventually charge for it.
|
"""Rapes a nick and eventually charge for it.
|
||||||
|
|
||||||
%%rape <nick>
|
%%rape <nick>
|
||||||
|
|
|
@ -3,7 +3,7 @@ import re
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
import irc3
|
import irc3
|
||||||
from docopt import Dict as DocOptDict
|
from docopt import Dict
|
||||||
from irc3.plugins.command import command
|
from irc3.plugins.command import command
|
||||||
from irc3.utils import IrcString
|
from irc3.utils import IrcString
|
||||||
from psycopg2 import Error
|
from psycopg2 import Error
|
||||||
|
@ -17,7 +17,7 @@ class Seen(DatabasePlugin):
|
||||||
'bot.plugins.storage']
|
'bot.plugins.storage']
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def seen(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def seen(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Get last seen date and message for a nick.
|
"""Get last seen date and message for a nick.
|
||||||
|
|
||||||
%%seen [<nick>]
|
%%seen [<nick>]
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
|
||||||
import irc3
|
import irc3
|
||||||
from docopt import Dict as DocOptDict
|
from docopt import Dict
|
||||||
from irc3.plugins.command import command
|
from irc3.plugins.command import command
|
||||||
from irc3.utils import IrcString
|
from irc3.utils import IrcString
|
||||||
from psycopg2 import Error
|
from psycopg2 import Error
|
||||||
|
@ -34,7 +34,7 @@ class Tell(DatabasePlugin):
|
||||||
self.tell_queue[nick].append(res[1:])
|
self.tell_queue[nick].append(res[1:])
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def tell(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def tell(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Saves a message for nick to forward on activity
|
"""Saves a message for nick to forward on activity
|
||||||
|
|
||||||
%%tell <nick> <message>...
|
%%tell <nick> <message>...
|
||||||
|
|
|
@ -5,8 +5,7 @@ from datetime import datetime
|
||||||
|
|
||||||
import irc3
|
import irc3
|
||||||
from aiocron import crontab
|
from aiocron import crontab
|
||||||
from docopt import Dict as DocOptDict
|
from docopt import Dict
|
||||||
from irc3.plugins.command import command
|
|
||||||
from irc3.utils import IrcString
|
from irc3.utils import IrcString
|
||||||
from psycopg2 import Error
|
from psycopg2 import Error
|
||||||
from psycopg2.extras import DictRow
|
from psycopg2.extras import DictRow
|
||||||
|
@ -26,7 +25,7 @@ class Timer(DatabasePlugin):
|
||||||
crontab('0 * * * *', func=self.set_timers)
|
crontab('0 * * * *', func=self.set_timers)
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def timer(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def timer(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Sets a timer, delay can be: s, m, h, d, w, mon, y
|
"""Sets a timer, delay can be: s, m, h, d, w, mon, y
|
||||||
|
|
||||||
%%timer <delay> <message>...
|
%%timer <delay> <message>...
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import irc3
|
import irc3
|
||||||
import requests
|
import requests
|
||||||
from docopt import Dict as DocOptDict
|
from docopt import Dict
|
||||||
from irc3.plugins.command import command
|
from irc3.plugins.command import command
|
||||||
from irc3.utils import IrcString
|
from irc3.utils import IrcString
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ class Urban(Plugin):
|
||||||
URL = 'https://api.urbandictionary.com/v0/define'
|
URL = 'https://api.urbandictionary.com/v0/define'
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def ud(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def ud(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Searches for a term on YouTube and returns first result.
|
"""Searches for a term on YouTube and returns first result.
|
||||||
|
|
||||||
%%ud <term>...
|
%%ud <term>...
|
||||||
|
|
|
@ -3,7 +3,7 @@ import random
|
||||||
import re
|
import re
|
||||||
|
|
||||||
import irc3
|
import irc3
|
||||||
from docopt import Dict as DocOptDict
|
from docopt import Dict
|
||||||
from irc3.plugins.command import command
|
from irc3.plugins.command import command
|
||||||
from irc3.utils import IrcString
|
from irc3.utils import IrcString
|
||||||
from psycopg2 import Error
|
from psycopg2 import Error
|
||||||
|
@ -42,7 +42,7 @@ class Useless(DatabasePlugin):
|
||||||
)
|
)
|
||||||
|
|
||||||
@command(permission='admin', show_in_help=False)
|
@command(permission='admin', show_in_help=False)
|
||||||
def kim(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def kim(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Kicks Kim, most useful command.
|
"""Kicks Kim, most useful command.
|
||||||
|
|
||||||
%%kim
|
%%kim
|
||||||
|
@ -83,7 +83,7 @@ class Useless(DatabasePlugin):
|
||||||
self.bot.privmsg(target, '\x02[{} INTENSIFIES]'.format(msg.upper()))
|
self.bot.privmsg(target, '\x02[{} INTENSIFIES]'.format(msg.upper()))
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def kill(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def kill(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Kills a user with a random message
|
"""Kills a user with a random message
|
||||||
|
|
||||||
%%kill [<nick>]
|
%%kill [<nick>]
|
||||||
|
@ -103,7 +103,7 @@ class Useless(DatabasePlugin):
|
||||||
))
|
))
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def yiff(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def yiff(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Yiffs a user with a random message
|
"""Yiffs a user with a random message
|
||||||
|
|
||||||
%%yiff [<nick>]
|
%%yiff [<nick>]
|
||||||
|
@ -124,7 +124,7 @@ class Useless(DatabasePlugin):
|
||||||
))
|
))
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def waifu(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def waifu(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Get waifu for a user (set with prefixing the user with =)
|
"""Get waifu for a user (set with prefixing the user with =)
|
||||||
|
|
||||||
%%waifu [<nick>...]
|
%%waifu [<nick>...]
|
||||||
|
@ -132,7 +132,7 @@ class Useless(DatabasePlugin):
|
||||||
return self.husbando_waifu('waifu', mask, target, args)
|
return self.husbando_waifu('waifu', mask, target, args)
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def husbando(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def husbando(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Get husbando for a user (set with prefixing the user with =)
|
"""Get husbando for a user (set with prefixing the user with =)
|
||||||
|
|
||||||
%%husbando [<nick>...]
|
%%husbando [<nick>...]
|
||||||
|
@ -140,7 +140,7 @@ class Useless(DatabasePlugin):
|
||||||
return self.husbando_waifu('husbando', mask, target, args)
|
return self.husbando_waifu('husbando', mask, target, args)
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def storyofpomfface(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def storyofpomfface(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Story of pomf face
|
"""Story of pomf face
|
||||||
|
|
||||||
%%storyofpomfface
|
%%storyofpomfface
|
||||||
|
@ -149,7 +149,7 @@ class Useless(DatabasePlugin):
|
||||||
self.bot.privmsg(target, face)
|
self.bot.privmsg(target, face)
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def choose(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def choose(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Decides between items (separated by comma)
|
"""Decides between items (separated by comma)
|
||||||
|
|
||||||
%%choose <items>...
|
%%choose <items>...
|
||||||
|
@ -158,7 +158,7 @@ class Useless(DatabasePlugin):
|
||||||
return '{}: {}'.format(mask.nick, choice.strip())
|
return '{}: {}'.format(mask.nick, choice.strip())
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def jn(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def jn(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Decides between yes and no (for a question).
|
"""Decides between yes and no (for a question).
|
||||||
|
|
||||||
%%jn <question>...
|
%%jn <question>...
|
||||||
|
@ -168,7 +168,7 @@ class Useless(DatabasePlugin):
|
||||||
return '{}: \x02\x030{}'.format(mask.nick, choice)
|
return '{}: \x02\x030{}'.format(mask.nick, choice)
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def kiss(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def kiss(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Kisses a user
|
"""Kisses a user
|
||||||
|
|
||||||
%%kiss [<nick>]
|
%%kiss [<nick>]
|
||||||
|
@ -176,7 +176,7 @@ class Useless(DatabasePlugin):
|
||||||
return '(づ。◕‿‿◕。)\x0304。。・゜゜・。。・゜❤\x03 {} \x0304❤'.format(args.get('<nick>', mask.nick))
|
return '(づ。◕‿‿◕。)\x0304。。・゜゜・。。・゜❤\x03 {} \x0304❤'.format(args.get('<nick>', mask.nick))
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def hug(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def hug(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Hugs a user
|
"""Hugs a user
|
||||||
|
|
||||||
%%hug [<nick>]
|
%%hug [<nick>]
|
||||||
|
@ -184,7 +184,7 @@ class Useless(DatabasePlugin):
|
||||||
return '\x0304♥♡❤♡♥\x03 {} \x0304♥♡❤♡♥'.format(args.get('<nick>', mask.nick))
|
return '\x0304♥♡❤♡♥\x03 {} \x0304♥♡❤♡♥'.format(args.get('<nick>', mask.nick))
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def bier(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def bier(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Gives a user a beer
|
"""Gives a user a beer
|
||||||
|
|
||||||
%%bier [<nick>]
|
%%bier [<nick>]
|
||||||
|
@ -193,7 +193,7 @@ class Useless(DatabasePlugin):
|
||||||
self.bot.action(target, 'schenkt ein kühles Blondes an {} aus.'.format(nick))
|
self.bot.action(target, 'schenkt ein kühles Blondes an {} aus.'.format(nick))
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def fucken(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def fucken(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Kills and fucks a user
|
"""Kills and fucks a user
|
||||||
|
|
||||||
%%fucken [<nick>]
|
%%fucken [<nick>]
|
||||||
|
@ -202,7 +202,7 @@ class Useless(DatabasePlugin):
|
||||||
self.bot.action(target, 'fuckt {0} und tötet {0} anschließend.'.format(nick, nick))
|
self.bot.action(target, 'fuckt {0} und tötet {0} anschließend.'.format(nick, nick))
|
||||||
|
|
||||||
@command(aliases=['anhero', 'sudoku'])
|
@command(aliases=['anhero', 'sudoku'])
|
||||||
def seppuku(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def seppuku(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Kicks a user
|
"""Kicks a user
|
||||||
|
|
||||||
%%seppuku
|
%%seppuku
|
||||||
|
@ -210,7 +210,7 @@ class Useless(DatabasePlugin):
|
||||||
self.bot.kick(target, mask.nick, 'Sayonara bonzai-chan...')
|
self.bot.kick(target, mask.nick, 'Sayonara bonzai-chan...')
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def hack(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def hack(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Hacks (a user)
|
"""Hacks (a user)
|
||||||
|
|
||||||
%%hack [<nick>]
|
%%hack [<nick>]
|
||||||
|
@ -219,7 +219,7 @@ class Useless(DatabasePlugin):
|
||||||
return 'hacking{}...'.format(' %s' % nick if nick else '')
|
return 'hacking{}...'.format(' %s' % nick if nick else '')
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def gay(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def gay(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Make someone gay (alias to rainbow)
|
"""Make someone gay (alias to rainbow)
|
||||||
|
|
||||||
%%gay <word>...
|
%%gay <word>...
|
||||||
|
@ -227,7 +227,7 @@ class Useless(DatabasePlugin):
|
||||||
return self.rainbow(mask, target, args)
|
return self.rainbow(mask, target, args)
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def rainbow(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def rainbow(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Colorize a word in rainbow colors
|
"""Colorize a word in rainbow colors
|
||||||
|
|
||||||
%%rainbow <word>...
|
%%rainbow <word>...
|
||||||
|
@ -242,7 +242,7 @@ class Useless(DatabasePlugin):
|
||||||
return ''.join(word)
|
return ''.join(word)
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def wrainbow(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def wrainbow(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Colorize words in a sentence with rainbow colors
|
"""Colorize words in a sentence with rainbow colors
|
||||||
|
|
||||||
%%wrainbow <words>...
|
%%wrainbow <words>...
|
||||||
|
@ -250,7 +250,7 @@ class Useless(DatabasePlugin):
|
||||||
return ' '.join([self._rainbow(i, word) for i, word in enumerate(args['<words>'])])
|
return ' '.join([self._rainbow(i, word) for i, word in enumerate(args['<words>'])])
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def halfwidth(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def halfwidth(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Turns UPPERCASE words into halfwidth characters
|
"""Turns UPPERCASE words into halfwidth characters
|
||||||
|
|
||||||
%%halfwidth <words>...
|
%%halfwidth <words>...
|
||||||
|
@ -262,7 +262,7 @@ class Useless(DatabasePlugin):
|
||||||
return '\x02[HALFWIDTH]\x02 {}'.format(re.sub(r'(?:\b)[A-Z]+(?:\b)', replace, ' '.join(args['<words>'])))
|
return '\x02[HALFWIDTH]\x02 {}'.format(re.sub(r'(?:\b)[A-Z]+(?:\b)', replace, ' '.join(args['<words>'])))
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def asshole(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def asshole(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Checks how much of an asshole you are
|
"""Checks how much of an asshole you are
|
||||||
|
|
||||||
%%asshole [<nick>]
|
%%asshole [<nick>]
|
||||||
|
@ -280,7 +280,7 @@ class Useless(DatabasePlugin):
|
||||||
return 'Asshole scan... {} is {}% of an asshole.'.format(nick, asshole_perc)
|
return 'Asshole scan... {} is {}% of an asshole.'.format(nick, asshole_perc)
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def assume(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def assume(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Assumes the gender of a nick or yourself
|
"""Assumes the gender of a nick or yourself
|
||||||
|
|
||||||
%%assume [<nick>]
|
%%assume [<nick>]
|
||||||
|
@ -290,7 +290,7 @@ class Useless(DatabasePlugin):
|
||||||
|
|
||||||
return 'Assuming {}\'s gender... they\'re a {}.'.format(nick, gender)
|
return 'Assuming {}\'s gender... they\'re a {}.'.format(nick, gender)
|
||||||
|
|
||||||
def husbando_waifu(self, field: str, mask: IrcString, target: IrcString, args: DocOptDict):
|
def husbando_waifu(self, field: str, mask: IrcString, target: IrcString, args: Dict):
|
||||||
nick = args.get('<nick>', mask.nick)
|
nick = args.get('<nick>', mask.nick)
|
||||||
if isinstance(nick, list):
|
if isinstance(nick, list):
|
||||||
nick = ' '.join(nick)
|
nick = ' '.join(nick)
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import irc3
|
import irc3
|
||||||
import requests
|
import requests
|
||||||
from docopt import Dict as DocOptDict
|
from docopt import Dict
|
||||||
from irc3.plugins.command import command
|
from irc3.plugins.command import command
|
||||||
from irc3.utils import IrcString
|
from irc3.utils import IrcString
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ class Weather(Plugin):
|
||||||
'(select woeid from geo.places(1) where text="{}")'
|
'(select woeid from geo.places(1) where text="{}")'
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def weather(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def weather(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Gets the weather from Yahoo weather API.
|
"""Gets the weather from Yahoo weather API.
|
||||||
|
|
||||||
%%weather <location>...
|
%%weather <location>...
|
||||||
|
|
|
@ -4,7 +4,7 @@ import re
|
||||||
|
|
||||||
import irc3
|
import irc3
|
||||||
import requests
|
import requests
|
||||||
from docopt import Dict as DocOptDict
|
from docopt import Dict
|
||||||
from irc3.plugins.command import command
|
from irc3.plugins.command import command
|
||||||
from irc3.utils import IrcString
|
from irc3.utils import IrcString
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ class YouTube(Plugin):
|
||||||
self.bot.privmsg(target, data)
|
self.bot.privmsg(target, data)
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def yt(self, mask: IrcString, target: IrcString, args: DocOptDict):
|
def yt(self, mask: IrcString, target: IrcString, args: Dict):
|
||||||
"""Searches for query on YouTube and returns first result.
|
"""Searches for query on YouTube and returns first result.
|
||||||
|
|
||||||
%%yt <query>...
|
%%yt <query>...
|
||||||
|
|
Loading…
Reference in New Issue
Block a user