mostlybot/commands/
vods.rs

1//! returns link to maxi's vod channel
2//!
3//! usage: ```!vods```
4//!
5//! author: mostlymaxi
6use super::ChatCommand;
7
8pub struct MostlyVods {}
9
10impl ChatCommand for MostlyVods {
11    fn new() -> Self {
12        MostlyVods {}
13    }
14
15    fn help(&self) -> String {
16        "usage: !vods".to_string()
17    }
18
19    fn names() -> Vec<String> {
20        vec!["vods".to_string(), "vod".to_string()]
21    }
22
23    fn handle(
24        &mut self,
25        api: &mut super::TwitchApiWrapper,
26        ctx: &twitcheventsub::MessageData,
27    ) -> anyhow::Result<()> {
28        let _ = api.send_chat_message_with_reply(
29            "check out maxi's vods on youtube!: https://www.youtube.com/@mostlyvods",
30            Some(&ctx.message_id),
31        );
32
33        Ok(())
34    }
35}