Updated command help texts
This commit is contained in:
parent
7eca476e29
commit
93b97c99c4
@ -19,7 +19,8 @@ class Coins(Plugin):
|
|||||||
|
|
||||||
@command
|
@command
|
||||||
def btc(self, mask: IrcString, channel: IrcString, args: DocOptDict):
|
def btc(self, mask: IrcString, channel: IrcString, args: DocOptDict):
|
||||||
"""Bitcoin command.
|
"""Gets the Bitcoin values from BitStamp
|
||||||
|
|
||||||
%%btc
|
%%btc
|
||||||
"""
|
"""
|
||||||
data = requests.get('https://www.bitstamp.net/api/ticker').json()
|
data = requests.get('https://www.bitstamp.net/api/ticker').json()
|
||||||
|
@ -38,7 +38,8 @@ class CTCP(Plugin):
|
|||||||
@command
|
@command
|
||||||
async def ping(self, mask: IrcString, channel: IrcString,
|
async def ping(self, mask: IrcString, channel: IrcString,
|
||||||
args: DocOptDict):
|
args: DocOptDict):
|
||||||
"""CTCP ping command.
|
"""Sends ping via CTCP to user and sends the time needed
|
||||||
|
|
||||||
%%ping [<nick>]
|
%%ping [<nick>]
|
||||||
"""
|
"""
|
||||||
nick = args.get('<nick>') or mask.nick
|
nick = args.get('<nick>') or mask.nick
|
||||||
@ -61,7 +62,8 @@ class CTCP(Plugin):
|
|||||||
@command
|
@command
|
||||||
async def finger(self, mask: IrcString, channel: IrcString,
|
async def finger(self, mask: IrcString, channel: IrcString,
|
||||||
args: DocOptDict):
|
args: DocOptDict):
|
||||||
"""CTCP finger command.
|
"""Gets the client response for finger nick user via CTCP
|
||||||
|
|
||||||
%%finger [<nick>]
|
%%finger [<nick>]
|
||||||
"""
|
"""
|
||||||
return await self.ctcp('FINGER', mask, args)
|
return await self.ctcp('FINGER', mask, args)
|
||||||
@ -69,14 +71,16 @@ class CTCP(Plugin):
|
|||||||
@command
|
@command
|
||||||
async def time(self, mask: IrcString, channel: IrcString,
|
async def time(self, mask: IrcString, channel: IrcString,
|
||||||
args: DocOptDict):
|
args: DocOptDict):
|
||||||
"""CTCP time command.
|
"""Gets the client time from nick via CTCP
|
||||||
|
|
||||||
%%time [<nick>]
|
%%time [<nick>]
|
||||||
"""
|
"""
|
||||||
return await self.ctcp('TIME', mask, args)
|
return await self.ctcp('TIME', mask, args)
|
||||||
|
|
||||||
@command
|
@command
|
||||||
async def ver(self, mask: IrcString, channel: IrcString, args: DocOptDict):
|
async def ver(self, mask: IrcString, channel: IrcString, args: DocOptDict):
|
||||||
"""CTCP version command.
|
"""Gets the client version from nick via CTCP
|
||||||
|
|
||||||
%%ver [<nick>]
|
%%ver [<nick>]
|
||||||
"""
|
"""
|
||||||
return await self.ctcp('VERSION', mask, args)
|
return await self.ctcp('VERSION', mask, args)
|
||||||
|
@ -21,6 +21,7 @@ class Futures(DatabasePlugin):
|
|||||||
|
|
||||||
def __init__(self, bot: IrcBot):
|
def __init__(self, bot: IrcBot):
|
||||||
super().__init__(bot)
|
super().__init__(bot)
|
||||||
|
# Restore timers from database
|
||||||
self.cur.execute('select * from timers')
|
self.cur.execute('select * from timers')
|
||||||
for res in self.cur.fetchall():
|
for res in self.cur.fetchall():
|
||||||
delta = res['until'] - datetime.utcnow()
|
delta = res['until'] - datetime.utcnow()
|
||||||
@ -30,8 +31,7 @@ class Futures(DatabasePlugin):
|
|||||||
|
|
||||||
@command
|
@command
|
||||||
def timer(self, mask: IrcString, channel: IrcString, args: DocOptDict):
|
def timer(self, mask: IrcString, channel: IrcString, args: DocOptDict):
|
||||||
"""Timer command, delay can be: s(econd), m(min), h(our), w(week),
|
"""Sets a timer, delay can be: s, m, h, w, mon, y(
|
||||||
mon(th), y(ear)
|
|
||||||
|
|
||||||
%%timer <delay> <message>...
|
%%timer <delay> <message>...
|
||||||
"""
|
"""
|
||||||
@ -53,10 +53,7 @@ class Futures(DatabasePlugin):
|
|||||||
|
|
||||||
async def _timer(self, mask: IrcString, channel: IrcString,
|
async def _timer(self, mask: IrcString, channel: IrcString,
|
||||||
delta: timedelta, message: str, delay: str, row_id: int):
|
delta: timedelta, message: str, delay: str, row_id: int):
|
||||||
"""
|
"""Async function, sleeps for `delay` seconds and sends notification"""
|
||||||
Actually the reminder function. Sleeps `delay` seconds and then sends
|
|
||||||
message to `channel` after that.
|
|
||||||
"""
|
|
||||||
seconds = delta.total_seconds()
|
seconds = delta.total_seconds()
|
||||||
if seconds > 0:
|
if seconds > 0:
|
||||||
await asyncio.sleep(seconds)
|
await asyncio.sleep(seconds)
|
||||||
|
@ -16,7 +16,8 @@ class McManiac(DatabasePlugin):
|
|||||||
# noinspection PyUnusedLocal
|
# noinspection PyUnusedLocal
|
||||||
@command(options_first=True)
|
@command(options_first=True)
|
||||||
def mcmaniac(self, mask: IrcString, channel: IrcString, args: DocOptDict):
|
def mcmaniac(self, mask: IrcString, channel: IrcString, args: DocOptDict):
|
||||||
"""Manage McManiacs
|
"""Get, add or delete McManiaCs
|
||||||
|
|
||||||
%%mcmaniac <cmd> <mcmaniac>
|
%%mcmaniac <cmd> <mcmaniac>
|
||||||
%%mcmaniac [<index>]
|
%%mcmaniac [<index>]
|
||||||
"""
|
"""
|
||||||
|
@ -22,8 +22,8 @@ class Quotes(DatabasePlugin):
|
|||||||
# noinspection PyUnusedLocal
|
# noinspection PyUnusedLocal
|
||||||
@command(options_first=True)
|
@command(options_first=True)
|
||||||
def q(self, mask: IrcString, channel: IrcString, args: DocOptDict):
|
def q(self, mask: IrcString, channel: IrcString, args: DocOptDict):
|
||||||
"""
|
"""Get, add or delete quots for a user
|
||||||
Manage quotes.
|
|
||||||
%%q <cmd> <nick> <quote>...
|
%%q <cmd> <nick> <quote>...
|
||||||
%%q <nick> [<index>]
|
%%q <nick> [<index>]
|
||||||
"""
|
"""
|
||||||
|
@ -29,7 +29,8 @@ class Useless(Plugin):
|
|||||||
'irc3.plugins.command',
|
'irc3.plugins.command',
|
||||||
]
|
]
|
||||||
|
|
||||||
@event(r'(?i)^:.* PRIVMSG (?P<channel>.*) :(?<!gnu[/+])linux(?! kernel).*')
|
@event(r'(?i)^:.* PRIVMSG (?P<channel>.*) :'
|
||||||
|
r'.*(?<!gnu[/+])linux(?! kernel).*')
|
||||||
def linux(self, channel: str):
|
def linux(self, channel: str):
|
||||||
if random.randint(0, 4) is 0:
|
if random.randint(0, 4) is 0:
|
||||||
self.bot.privmsg(channel, GNU_LINUX)
|
self.bot.privmsg(channel, GNU_LINUX)
|
||||||
@ -50,7 +51,8 @@ class Useless(Plugin):
|
|||||||
@command
|
@command
|
||||||
def storyofpomfface(self, mask: IrcString, channel: IrcString,
|
def storyofpomfface(self, mask: IrcString, channel: IrcString,
|
||||||
args: DocOptDict):
|
args: DocOptDict):
|
||||||
"""Story of pomf face command.
|
"""Story of pomf face
|
||||||
|
|
||||||
%%storyofpomfface
|
%%storyofpomfface
|
||||||
"""
|
"""
|
||||||
for face in (':O C==3', ':OC==3', ':C==3', ':C=3', ':C3', ':3'):
|
for face in (':O C==3', ':OC==3', ':C==3', ':C=3', ':C3', ':3'):
|
||||||
@ -58,7 +60,8 @@ class Useless(Plugin):
|
|||||||
|
|
||||||
@command
|
@command
|
||||||
def jn(self, mask: IrcString, channel: IrcString, args: DocOptDict):
|
def jn(self, mask: IrcString, channel: IrcString, args: DocOptDict):
|
||||||
"""Yes or no command.
|
"""Decides between yes and no (for a question)
|
||||||
|
|
||||||
%%jn <question>
|
%%jn <question>
|
||||||
%%jn
|
%%jn
|
||||||
"""
|
"""
|
||||||
@ -67,7 +70,8 @@ class Useless(Plugin):
|
|||||||
|
|
||||||
@command
|
@command
|
||||||
def kiss(self, mask: IrcString, channel: IrcString, args: DocOptDict):
|
def kiss(self, mask: IrcString, channel: IrcString, args: DocOptDict):
|
||||||
"""Kiss command.
|
"""Kisses a user
|
||||||
|
|
||||||
%%kiss <nick>
|
%%kiss <nick>
|
||||||
"""
|
"""
|
||||||
return fmt('(づ。◕‿‿◕。)づ{color}{red}。。・゜゜・。。・゜❤{reset} {nick} '
|
return fmt('(づ。◕‿‿◕。)づ{color}{red}。。・゜゜・。。・゜❤{reset} {nick} '
|
||||||
@ -77,7 +81,8 @@ class Useless(Plugin):
|
|||||||
@command
|
@command
|
||||||
def hug(self, mask: IrcString, channel: IrcString,
|
def hug(self, mask: IrcString, channel: IrcString,
|
||||||
args: DocOptDict) -> str:
|
args: DocOptDict) -> str:
|
||||||
"""Hug command.
|
"""Hugs a user
|
||||||
|
|
||||||
%%hug <nick>
|
%%hug <nick>
|
||||||
"""
|
"""
|
||||||
return fmt('{color}{red}♥♡❤♡♥{reset} {nick} {color}{red}♥♡❤♡♥',
|
return fmt('{color}{red}♥♡❤♡♥{reset} {nick} {color}{red}♥♡❤♡♥',
|
||||||
@ -85,7 +90,8 @@ class Useless(Plugin):
|
|||||||
|
|
||||||
@command
|
@command
|
||||||
def hack(self, mask: IrcString, channel: IrcString, args: DocOptDict):
|
def hack(self, mask: IrcString, channel: IrcString, args: DocOptDict):
|
||||||
"""Hack command.
|
"""Hacks (a user)
|
||||||
|
|
||||||
%%hack [<nick>]
|
%%hack [<nick>]
|
||||||
"""
|
"""
|
||||||
nick = args.get('<nick>') or ''
|
nick = args.get('<nick>') or ''
|
||||||
@ -95,14 +101,16 @@ class Useless(Plugin):
|
|||||||
|
|
||||||
@command
|
@command
|
||||||
def gay(self, mask: IrcString, channel: IrcString, args: DocOptDict):
|
def gay(self, mask: IrcString, channel: IrcString, args: DocOptDict):
|
||||||
"""Gay command (alias to rainbow).
|
"""Make someone gay (alias to rainbow)
|
||||||
|
|
||||||
%%gay <word>...
|
%%gay <word>...
|
||||||
"""
|
"""
|
||||||
return self.rainbow(mask, channel, args)
|
return self.rainbow(mask, channel, args)
|
||||||
|
|
||||||
@command
|
@command
|
||||||
def rainbow(self, mask: IrcString, channel: IrcString, args: DocOptDict):
|
def rainbow(self, mask: IrcString, channel: IrcString, args: DocOptDict):
|
||||||
"""Rainbow command.
|
"""Colorize a word in rainbow colors
|
||||||
|
|
||||||
%%rainbow <word>...
|
%%rainbow <word>...
|
||||||
"""
|
"""
|
||||||
last = 0
|
last = 0
|
||||||
@ -116,7 +124,8 @@ class Useless(Plugin):
|
|||||||
|
|
||||||
@command
|
@command
|
||||||
def wrainbow(self, mask: IrcString, channel: IrcString, args: DocOptDict):
|
def wrainbow(self, mask: IrcString, channel: IrcString, args: DocOptDict):
|
||||||
"""Word Rainbow command.
|
"""Colorize words in a sentence with rainbow colors
|
||||||
|
|
||||||
%%wrainbow <words>...
|
%%wrainbow <words>...
|
||||||
"""
|
"""
|
||||||
return fmt(' '.join(['{color}{%s}%s' % (RAINBOW[i % RAINBOW_LEN], word)
|
return fmt(' '.join(['{color}{%s}%s' % (RAINBOW[i % RAINBOW_LEN], word)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user