mirror of
https://github.com/SpiceBot/SpiceBot.git
synced 2026-11-10 21:50:59 -05:00
wait til the bot is loaded
This commit is contained in:
parent
4b5215a35e
commit
4b0343e5de
@ -9,6 +9,7 @@ import sopel_modules.SpiceBot as SpiceBot
|
||||
import spicemanip
|
||||
|
||||
|
||||
@SpiceBot.events.check_ready([SpiceBot.events.BOT_LOADED])
|
||||
@SpiceBot.prerun('nickname')
|
||||
@sopel.module.nickname_commands('ai')
|
||||
def ai_trigger(bot, trigger, botcom):
|
||||
@ -18,6 +19,7 @@ def ai_trigger(bot, trigger, botcom):
|
||||
bot.osd(displayval)
|
||||
|
||||
|
||||
@SpiceBot.events.check_ready([SpiceBot.events.BOT_LOADED])
|
||||
@sopel.module.rule('(.*)')
|
||||
def bot_command_rule_ai(bot, trigger):
|
||||
|
||||
|
||||
@ -9,12 +9,14 @@ import spicemanip
|
||||
import sopel_modules.SpiceBot as SpiceBot
|
||||
|
||||
|
||||
@SpiceBot.events.check_ready([SpiceBot.events.BOT_LOADED])
|
||||
@SpiceBot.prerun('nickname')
|
||||
@sopel.module.nickname_commands('owners', 'owner')
|
||||
def bot_command_owners(bot, trigger, botcom):
|
||||
bot_command_process(bot, trigger)
|
||||
|
||||
|
||||
@SpiceBot.events.check_ready([SpiceBot.events.BOT_LOADED])
|
||||
@SpiceBot.prerun('nickname')
|
||||
@sopel.module.nickname_commands('admins', 'admin')
|
||||
def bot_command_admins(bot, trigger, botcom):
|
||||
|
||||
@ -12,12 +12,14 @@ import spicemanip
|
||||
import sopel_modules.SpiceBot as SpiceBot
|
||||
|
||||
|
||||
@SpiceBot.events.check_ready([SpiceBot.events.BOT_LOADED])
|
||||
@SpiceBot.prerun('nickname')
|
||||
@sopel.module.nickname_commands('query')
|
||||
def query_trigger(bot, trigger, botcom):
|
||||
bot.osd("I have been programmed to help find new commands by using `?`.")
|
||||
|
||||
|
||||
@SpiceBot.events.check_ready([SpiceBot.events.BOT_LOADED])
|
||||
@SpiceBot.events.check_ready([SpiceBot.events.BOT_COMMANDS])
|
||||
@SpiceBot.prerun_query('nickname', 'nickname')
|
||||
@sopel.module.nickname_commands('(.*)')
|
||||
|
||||
@ -10,6 +10,7 @@ import sopel.module
|
||||
import sopel_modules.SpiceBot as SpiceBot
|
||||
|
||||
|
||||
@SpiceBot.events.check_ready([SpiceBot.events.BOT_LOADED])
|
||||
@sopel.module.nickname_commands('database')
|
||||
def bot_command_database(bot, trigger):
|
||||
bot.osd("Database is " + SpiceBot.config.db_type)
|
||||
|
||||
@ -15,6 +15,7 @@ from word2number import w2n
|
||||
from random import randint
|
||||
|
||||
|
||||
@SpiceBot.events.check_ready([SpiceBot.events.BOT_LOADED])
|
||||
@SpiceBot.prerun('module', 'dictcom')
|
||||
@sopel.module.commands('(.*)')
|
||||
def command_dictcom(bot, trigger, botcom):
|
||||
|
||||
@ -7,10 +7,13 @@ import sopel.module
|
||||
import sopel_modules.SpiceBot as SpiceBot
|
||||
|
||||
|
||||
@SpiceBot.events.check_ready([SpiceBot.events.BOT_LOADED])
|
||||
@sopel.module.nickname_commands('help', 'docs', 'wiki')
|
||||
def bot_command_docs(bot, trigger):
|
||||
bot.osd(["IRC Modules Repository",
|
||||
str(SpiceBot.github_dict["url_main"] +
|
||||
SpiceBot.github_dict["repo_owner"] + "/" +
|
||||
SpiceBot.github_dict["repo_name"] +
|
||||
SpiceBot.github_dict["url_path_wiki"])])
|
||||
sb_git_url = str(
|
||||
SpiceBot.github_dict["url_main"] +
|
||||
SpiceBot.github_dict["repo_owner"] + "/" +
|
||||
SpiceBot.github_dict["repo_name"] +
|
||||
SpiceBot.github_dict["url_path_wiki"]
|
||||
)
|
||||
bot.osd(["IRC Modules Repository", sb_git_url])
|
||||
|
||||
@ -11,6 +11,7 @@ import spicemanip
|
||||
# TODO custom gif shortcut commands
|
||||
|
||||
|
||||
@SpiceBot.events.check_ready([SpiceBot.events.BOT_LOADED])
|
||||
@SpiceBot.prerun('module')
|
||||
@sopel.module.commands('gif')
|
||||
def gif_trigger(bot, trigger, botcom):
|
||||
|
||||
@ -9,18 +9,21 @@ import spicemanip
|
||||
import sopel_modules.SpiceBot as SpiceBot
|
||||
|
||||
|
||||
@SpiceBot.events.check_ready([SpiceBot.events.BOT_LOADED])
|
||||
@SpiceBot.prerun('nickname')
|
||||
@sopel.module.nickname_commands('action')
|
||||
def bot_command_action(bot, trigger, botcom):
|
||||
bot_command_process(bot, trigger)
|
||||
|
||||
|
||||
@SpiceBot.events.check_ready([SpiceBot.events.BOT_LOADED])
|
||||
@SpiceBot.prerun('nickname')
|
||||
@sopel.module.nickname_commands('notice')
|
||||
def bot_command_notice(bot, trigger, botcom):
|
||||
bot_command_process(bot, trigger)
|
||||
|
||||
|
||||
@SpiceBot.events.check_ready([SpiceBot.events.BOT_LOADED])
|
||||
@SpiceBot.prerun('nickname')
|
||||
@sopel.module.nickname_commands('privmsg', 'say', 'msg')
|
||||
def bot_command_privmsg(bot, trigger, botcom):
|
||||
|
||||
@ -7,16 +7,23 @@ import sopel.module
|
||||
import sopel_modules.SpiceBot as SpiceBot
|
||||
|
||||
|
||||
@SpiceBot.events.check_ready([SpiceBot.events.BOT_LOADED])
|
||||
@sopel.module.rule(r"""(?:)u/
|
||||
(
|
||||
(?:\\/ | [^/])+
|
||||
)
|
||||
""")
|
||||
def bot_command_reddit_user(bot, trigger):
|
||||
message = SpiceBot.reddit.prerun(trigger)
|
||||
bot.osd(message)
|
||||
|
||||
|
||||
@SpiceBot.events.check_ready([SpiceBot.events.BOT_LOADED])
|
||||
@sopel.module.rule(r"""(?:)r/
|
||||
(
|
||||
(?:\\/ | [^/])+
|
||||
)
|
||||
""")
|
||||
def bot_command_reddit_syntax(bot, trigger):
|
||||
def bot_command_reddit_subreddit(bot, trigger):
|
||||
message = SpiceBot.reddit.prerun(trigger)
|
||||
bot.osd(message)
|
||||
|
||||
@ -9,6 +9,7 @@ import spicemanip
|
||||
import sopel_modules.SpiceBot as SpiceBot
|
||||
|
||||
|
||||
@SpiceBot.events.check_ready([SpiceBot.events.BOT_LOADED])
|
||||
@SpiceBot.prerun('nickname')
|
||||
@sopel.module.nickname_commands('update')
|
||||
def nickname_comand_update(bot, trigger, botcom):
|
||||
@ -41,6 +42,7 @@ def nickname_comand_update(bot, trigger, botcom):
|
||||
SpiceBot.spicebot_reload(bot, 'SpiceBot_Update', quitmessage)
|
||||
|
||||
|
||||
@SpiceBot.events.check_ready([SpiceBot.events.BOT_LOADED])
|
||||
@SpiceBot.prerun('nickname')
|
||||
@sopel.module.nickname_commands('restart')
|
||||
def nickname_comand_restart(bot, trigger, botcom):
|
||||
|
||||
@ -10,6 +10,7 @@ import spicemanip
|
||||
import sopel_modules.SpiceBot as SpiceBot
|
||||
|
||||
|
||||
@SpiceBot.events.check_ready([SpiceBot.events.BOT_LOADED])
|
||||
@SpiceBot.prerun('module')
|
||||
@sopel.module.commands('search', 'find', 'google', 'lookup')
|
||||
def search_main(bot, trigger, botcom):
|
||||
@ -26,6 +27,7 @@ def search_main(bot, trigger, botcom):
|
||||
bot.osd(["[Information search for '" + str(searchterm) + "']", str(searchreturn)])
|
||||
|
||||
|
||||
@SpiceBot.events.check_ready([SpiceBot.events.BOT_LOADED])
|
||||
@SpiceBot.prerun('module')
|
||||
@sopel.module.commands("where", "whereis")
|
||||
def search_where(bot, trigger, botcom):
|
||||
@ -42,6 +44,7 @@ def search_where(bot, trigger, botcom):
|
||||
bot.osd(["[Location search for " + str(searchterm) + "]", str(searchreturn)])
|
||||
|
||||
|
||||
@SpiceBot.events.check_ready([SpiceBot.events.BOT_LOADED])
|
||||
@SpiceBot.prerun('module')
|
||||
@sopel.module.commands("what", "whatis")
|
||||
def search_what(bot, trigger, botcom):
|
||||
|
||||
@ -9,6 +9,7 @@ import spicemanip
|
||||
import sopel_modules.SpiceBot as SpiceBot
|
||||
|
||||
|
||||
@SpiceBot.events.check_ready([SpiceBot.events.BOT_LOADED])
|
||||
@SpiceBot.prerun('module')
|
||||
@sopel.module.commands('sherlock', 'username')
|
||||
def bot_command_sherlock(bot, trigger, botcom):
|
||||
|
||||
@ -9,6 +9,7 @@ import time
|
||||
import sopel_modules.SpiceBot as SpiceBot
|
||||
|
||||
|
||||
@SpiceBot.events.check_ready([SpiceBot.events.BOT_LOADED])
|
||||
@SpiceBot.prerun('nickname')
|
||||
@sopel.module.nickname_commands('uptime')
|
||||
def bot_command_uptime(bot, trigger, botcom):
|
||||
|
||||
@ -8,6 +8,7 @@ import sopel
|
||||
import sopel_modules.SpiceBot as SpiceBot
|
||||
|
||||
|
||||
@SpiceBot.events.check_ready([SpiceBot.events.BOT_LOADED])
|
||||
@SpiceBot.prerun('nickname')
|
||||
@sopel.module.nickname_commands('users', 'user')
|
||||
def nickname_comand_users(bot, trigger, botcom):
|
||||
|
||||
Loading…
Reference in New Issue
Block a user