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