Base for new scanner
This commit is contained in:
+13
-7
@@ -2,7 +2,7 @@ from miniscord import Bot
|
||||
import logging
|
||||
|
||||
from utils import emojis
|
||||
from scanners import EmotesScanner
|
||||
from scanners import EmotesScanner, FrequencyScanner
|
||||
|
||||
logging.basicConfig(
|
||||
format="[%(asctime)s][%(levelname)s][%(module)s] %(message)s", level=logging.INFO
|
||||
@@ -11,16 +11,22 @@ logging.basicConfig(
|
||||
emojis.load_emojis()
|
||||
|
||||
bot = Bot(
|
||||
"Discord Analyst", # name
|
||||
"1.6(wip)", # version
|
||||
alias="%", # respond to '|command' messages
|
||||
"Discord Analyst",
|
||||
"1.6(wip)",
|
||||
alias="%",
|
||||
)
|
||||
bot.log_calls = True
|
||||
bot.client.bot = bot # TODO place in miniscord
|
||||
bot.register_command(
|
||||
"emotes", # command text (regex)
|
||||
lambda *args: EmotesScanner().compute(*args), # command function
|
||||
"emotes: Emotes analysis", # short help
|
||||
"freq(ency)?",
|
||||
lambda *args: FrequencyScanner().compute(*args),
|
||||
"freq: Frequency analysis",
|
||||
FrequencyScanner.help(),
|
||||
)
|
||||
bot.register_command(
|
||||
"emotes",
|
||||
lambda *args: EmotesScanner().compute(*args),
|
||||
"emotes: Emotes analysis",
|
||||
EmotesScanner.help(),
|
||||
)
|
||||
bot.start()
|
||||
|
||||
Reference in New Issue
Block a user