Replace help_tiny by module docstring
This commit is contained in:
parent
e5ec487d29
commit
cd7843e16e
2
bot.py
2
bot.py
@ -608,7 +608,7 @@ def _help_msg(sndr, modules, cmd):
|
||||
res.append_message(title="Pour plus de détails sur un module, "
|
||||
"envoyez \"!help nomdumodule\". Voici la liste"
|
||||
" de tous les modules disponibles localement",
|
||||
message=["\x03\x02%s\x03\x02 (%s)" % (im, modules[im].help_tiny ()) for im in modules if hasattr(modules[im], "help_tiny")])
|
||||
message=["\x03\x02%s\x03\x02 (%s)" % (im, modules[im].__doc__) for im in modules if modules[im].__doc__])
|
||||
return res
|
||||
|
||||
def hotswap(bak):
|
||||
|
@ -1,5 +1,7 @@
|
||||
# coding=utf-8
|
||||
|
||||
"""Create alias of commands"""
|
||||
|
||||
import re
|
||||
import sys
|
||||
from datetime import datetime
|
||||
@ -19,10 +21,6 @@ def load(context):
|
||||
DATAS.getNode("variables").setIndex("name")
|
||||
|
||||
|
||||
def help_tiny ():
|
||||
"""Line inserted in the response to the command !help"""
|
||||
return "alias module"
|
||||
|
||||
def help_full ():
|
||||
return "TODO"
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
# coding=utf-8
|
||||
|
||||
"""People birthdays and ages"""
|
||||
|
||||
import re
|
||||
import sys
|
||||
from datetime import datetime
|
||||
@ -15,11 +17,6 @@ def load(context):
|
||||
DATAS.setIndex("name", "birthday")
|
||||
|
||||
|
||||
def help_tiny():
|
||||
"""Line inserted in the response to the command !help"""
|
||||
return "People birthdays and ages"
|
||||
|
||||
|
||||
def help_full():
|
||||
return "!anniv /who/: gives the remaining time before the anniversary of /who/\n!age /who/: gives the age of /who/\nIf /who/ is not given, gives the remaining time before your anniversary.\n\n To set yout birthday, say it to nemubot :)"
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
# coding=utf-8
|
||||
|
||||
"""Wishes Happy New Year when the time comes"""
|
||||
|
||||
from datetime import datetime
|
||||
|
||||
from hooks import hook
|
||||
|
@ -1,5 +1,7 @@
|
||||
# coding=utf-8
|
||||
|
||||
"""Find french conjugaison"""
|
||||
|
||||
import re
|
||||
import traceback
|
||||
import sys
|
||||
@ -28,9 +30,6 @@ d = defaultdict(list)
|
||||
for k, v in s:
|
||||
d[k].append(v)
|
||||
|
||||
def help_tiny():
|
||||
return "Find french conjugaison"
|
||||
|
||||
def help_full():
|
||||
return "!conjugaison <tens> <verb>: give the conjugaison for <verb> in <tens>."
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
# coding=utf-8
|
||||
|
||||
"""Search around various search engine or knowledges database"""
|
||||
|
||||
import imp
|
||||
|
||||
from hooks import hook
|
||||
|
@ -1,5 +1,7 @@
|
||||
# coding=utf-8
|
||||
|
||||
"""Create countdowns and reminders"""
|
||||
|
||||
import imp
|
||||
import re
|
||||
import sys
|
||||
@ -14,10 +16,6 @@ nemubotversion = 3.4
|
||||
from event import ModuleEvent
|
||||
from hooks import Hook, hook
|
||||
|
||||
def help_tiny ():
|
||||
"""Line inserted in the response to the command !help"""
|
||||
return "events manager"
|
||||
|
||||
def help_full ():
|
||||
return "This module store a lot of events: ny, we, " + (", ".join(DATAS.index.keys())) + "\n!eventslist: gets list of timer\n!start /something/: launch a timer"
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
# coding=utf-8
|
||||
|
||||
"""Repositories, users or issues on GitHub"""
|
||||
|
||||
import json
|
||||
import re
|
||||
import urllib.error
|
||||
@ -10,10 +12,6 @@ from hooks import hook
|
||||
|
||||
nemubotversion = 3.4
|
||||
|
||||
def help_tiny ():
|
||||
"""Line inserted in the response to the command !help"""
|
||||
return "The GitHub module"
|
||||
|
||||
def help_full ():
|
||||
return "!github /repo/: Display information about /repo/.\n!github_user /user/: Display information about /user/."
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
# coding=utf-8
|
||||
|
||||
"""Show many information about a movie or serie"""
|
||||
|
||||
import json
|
||||
import re
|
||||
import urllib.request
|
||||
@ -8,9 +10,6 @@ from hooks import hook
|
||||
|
||||
nemubotversion = 3.4
|
||||
|
||||
def help_tiny ():
|
||||
return "Show many information about a movie or serie"
|
||||
|
||||
def help_full ():
|
||||
return "Search a movie title with: !imdbs <approximative title> ; View movie details with !imdb <title>"
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
# coding=utf-8
|
||||
|
||||
"""Various network tools (w3m, w3c validator, curl, traceurl, ...)"""
|
||||
|
||||
import datetime
|
||||
import http.client
|
||||
import json
|
||||
@ -21,10 +23,6 @@ def load(context):
|
||||
else:
|
||||
add_hook("cmd_hook", Hook(cmd_whois, "netwhois"))
|
||||
|
||||
def help_tiny():
|
||||
"""Line inserted in the response to the command !help"""
|
||||
return "The networking module"
|
||||
|
||||
def help_full():
|
||||
return "!traceurl /url/: Follow redirections from /url/."
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
# coding=utf-8
|
||||
|
||||
"""Informe les usagers des prochains passages des transports en communs de la RATP"""
|
||||
|
||||
import http.client
|
||||
import re
|
||||
from xml.dom.minidom import parseString
|
||||
@ -13,10 +15,6 @@ def load(context):
|
||||
DATAS.setIndex("name", "station")
|
||||
|
||||
|
||||
def help_tiny ():
|
||||
"""Line inserted in the response to the command !help"""
|
||||
return "Informe les usagers des prochains passages des transports en communs de la RATP"
|
||||
|
||||
def help_full ():
|
||||
return "!ratp transport line [station]: Donne des informations sur les prochains passages du transport en commun séléctionné à l'arrêt désiré. Si aucune station n'est précisée, les liste toutes."
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
# coding=utf-8
|
||||
|
||||
"""Get information about subreddit"""
|
||||
|
||||
import json
|
||||
import re
|
||||
import urllib
|
||||
@ -8,10 +10,6 @@ nemubotversion = 3.4
|
||||
|
||||
from hooks import hook
|
||||
|
||||
def help_tiny():
|
||||
"""Line inserted in the response to the command !help"""
|
||||
return "The subreddit module"
|
||||
|
||||
def help_full():
|
||||
return "!subreddit /subreddit/: Display information on the subreddit."
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
# coding=utf-8
|
||||
|
||||
"""Help to make choice"""
|
||||
|
||||
import random
|
||||
|
||||
from hooks import hook
|
||||
|
@ -1,5 +1,7 @@
|
||||
# coding=utf-8
|
||||
|
||||
"""Find information about an SAP transaction codes"""
|
||||
|
||||
import urllib.request
|
||||
import json
|
||||
import re
|
||||
@ -10,9 +12,6 @@ from tools.web import striphtml
|
||||
|
||||
nemubotversion = 3.4
|
||||
|
||||
def help_tiny ():
|
||||
return "Find information about an SAP transaction codes"
|
||||
|
||||
def help_full ():
|
||||
return "!tcode <transaction code|keywords>"
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
# coding=utf-8
|
||||
|
||||
"""as http://sleepyti.me/, give you the best time to go to bed"""
|
||||
|
||||
import re
|
||||
import imp
|
||||
from datetime import datetime
|
||||
@ -9,10 +11,6 @@ from hooks import hook
|
||||
|
||||
nemubotversion = 3.4
|
||||
|
||||
def help_tiny():
|
||||
"""Line inserted in the response to the command !help"""
|
||||
return "as http://sleepyti.me/, give you the best time to go to bed"
|
||||
|
||||
def help_full():
|
||||
return "If you would like to sleep soon, use !sleepytime to know the best time to wake up; use !sleepytime hh:mm if you want to wake up at hh:mm"
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
# coding=utf-8
|
||||
|
||||
"""Send SMS using SMS API (currently only Free Mobile)"""
|
||||
|
||||
import re
|
||||
import socket
|
||||
import time
|
||||
@ -15,10 +17,6 @@ def load(context):
|
||||
global DATAS
|
||||
DATAS.setIndex("name", "phone")
|
||||
|
||||
def help_tiny():
|
||||
"""Line inserted in the response to the command !help"""
|
||||
return "Send SMS using SMS API (currently only Free Mobile)"
|
||||
|
||||
def help_full():
|
||||
return "!sms /who/[,/who/[,...]] message: send a SMS to /who/."
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
# coding=utf-8
|
||||
|
||||
"""Check words spelling"""
|
||||
|
||||
import re
|
||||
from urllib.parse import quote
|
||||
|
||||
@ -10,9 +12,6 @@ from .pyaspell import AspellError
|
||||
|
||||
nemubotversion = 3.4
|
||||
|
||||
def help_tiny():
|
||||
return "Check words spelling"
|
||||
|
||||
def help_full():
|
||||
return "!spell [<lang>] <word>: give the correct spelling of <word> in <lang=fr>."
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
# coding=utf-8
|
||||
|
||||
"""Find french synonyms"""
|
||||
|
||||
import re
|
||||
import traceback
|
||||
import sys
|
||||
@ -10,9 +12,6 @@ from tools import web
|
||||
|
||||
nemubotversion = 3.4
|
||||
|
||||
def help_tiny():
|
||||
return "Find french synonyms"
|
||||
|
||||
def help_full():
|
||||
return "!syno <word>: give a list of synonyms for <word>."
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
# coding=utf-8
|
||||
|
||||
"""Translation module"""
|
||||
|
||||
import http.client
|
||||
import re
|
||||
import socket
|
||||
@ -30,10 +32,6 @@ def load(context):
|
||||
add_hook("cmd_hook", Hook(cmd_translate, "translate"))
|
||||
|
||||
|
||||
def help_tiny():
|
||||
"""Line inserted in the response to the command !help"""
|
||||
return "Translation module"
|
||||
|
||||
def help_full():
|
||||
return "!translate [lang] <term>[ <term>[...]]: Found translation of <term> from/to english to/from <lang>. Data © WordReference.com"
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
# coding=utf-8
|
||||
|
||||
"""Gets information about velib stations"""
|
||||
|
||||
import re
|
||||
|
||||
from tools import web
|
||||
@ -15,10 +17,6 @@ def load(context):
|
||||
# station_status)
|
||||
# context.add_event(evt)
|
||||
|
||||
def help_tiny ():
|
||||
"""Line inserted in the response to the command !help"""
|
||||
return "Gets information about velib stations"
|
||||
|
||||
def help_full ():
|
||||
return "!velib /number/ ...: gives available bikes and slots at the station /number/."
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
# coding=utf-8
|
||||
|
||||
"""Alert on changes on websites"""
|
||||
|
||||
from datetime import datetime
|
||||
from datetime import timedelta
|
||||
import http.client
|
||||
@ -17,10 +19,6 @@ from .atom import Atom
|
||||
|
||||
nemubotversion = 3.4
|
||||
|
||||
def help_tiny ():
|
||||
"""Line inserted in the response to the command !help"""
|
||||
return "Alert on changes on websites"
|
||||
|
||||
def help_full ():
|
||||
return "This module is autonomous you can't interract with it."
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
# coding=utf-8
|
||||
|
||||
"""The weather module"""
|
||||
|
||||
import datetime
|
||||
import json
|
||||
import re
|
||||
@ -27,10 +29,6 @@ def load(context):
|
||||
add_hook("cmd_hook", Hook(cmd_coordinates, "coordinates"))
|
||||
|
||||
|
||||
def help_tiny ():
|
||||
"""Line inserted in the response to the command !help"""
|
||||
return "The weather module"
|
||||
|
||||
def help_full ():
|
||||
return "!weather /city/: Display the current weather in /city/."
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
# coding=utf-8
|
||||
|
||||
"""The 2014 football worldcup module"""
|
||||
|
||||
import datetime
|
||||
import json
|
||||
import re
|
||||
@ -19,10 +21,6 @@ def load(context):
|
||||
add_event(ModuleEvent(func=lambda url: urlopen(url, timeout=10).read().decode(), func_data=API_URL % "matches/current?by_date=DESC", call=current_match_new_action, intervalle=30))
|
||||
|
||||
|
||||
def help_tiny ():
|
||||
"""Line inserted in the response to the command !help"""
|
||||
return "The 2014 football worldcup module"
|
||||
|
||||
def help_full ():
|
||||
return "!worldcup: do something."
|
||||
|
||||
|
@ -1,5 +1,7 @@
|
||||
# coding=utf-8
|
||||
|
||||
"""URL reducer module"""
|
||||
|
||||
import re
|
||||
from urllib.parse import urlparse
|
||||
from urllib.parse import quote
|
||||
@ -9,10 +11,6 @@ from hooks import hook
|
||||
|
||||
nemubotversion = 3.4
|
||||
|
||||
def help_tiny():
|
||||
"""Line inserted in the response to the command !help"""
|
||||
return "Gets YCC urls"
|
||||
|
||||
def help_full():
|
||||
return "!ycc [<url>]: with an argument, reduce the given <url> thanks to ycc.fr; without argument, reduce the last URL said on the current channel."
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user