aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorMax Audron <audron@cocaine.farm>2021-10-16 13:49:23 +0200
committerMax Audron <audron@cocaine.farm>2021-10-16 13:53:22 +0200
commit7cbe1e70e440c29375425182e661ea9ff7bd6300 (patch)
treede36d71d9167eed333f9a216f2d1588941b528c0 /src/main.rs
parentmove bot initialization out of macro (diff)
rework configuration to allow extensibility by hooksconfig-rework
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/main.rs b/src/main.rs
index 100af91..2428dff 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -12,6 +12,8 @@ async fn main() {
let mut bot = Bot::new().await.unwrap();
let mut sed = catinator::hooks::sed::Sed::new();
+ let wolfram_alpha = catinator::hooks::wolfram_alpha::WolframAlpha::new(&bot)
+ .expect("failed to initialize WolframAlpha command");
catinator![
hook(
@@ -57,7 +59,7 @@ async fn main() {
async command(
"wa",
"Returns Wolfram Alpha results for a query",
- catinator::hooks::wolfram_alpha::wa
+ wolfram_alpha.wa
),
];
}