-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(dispatcher): more idiomatic structure
- Loading branch information
Showing
7 changed files
with
73 additions
and
88 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,33 @@ | ||
// SPDX-License-Identifier: BSD-3-Clause | ||
// Copyright (c) 2024 Hitalo M. <https://github.com/HitaloM> | ||
|
||
use teloxide::macros::BotCommands; | ||
|
||
pub mod bans; | ||
pub mod start; | ||
|
||
#[derive(BotCommands, Clone)] | ||
#[command( | ||
rename_rule = "lowercase", | ||
description = "Commands for <i>start</i> handler:" | ||
)] | ||
pub enum StartCommand { | ||
#[command(description = "Initialize the bot.")] | ||
Start, | ||
#[command(description = "Display help information.")] | ||
Help, | ||
} | ||
|
||
#[derive(BotCommands, Clone)] | ||
#[command( | ||
rename_rule = "lowercase", | ||
description = "Commands for <i>bans</i> handler:" | ||
)] | ||
pub enum BansCommand { | ||
#[command(description = "Kick a user from the group (reply to the user).")] | ||
Kick, | ||
#[command(description = "Ban a user from the group (reply to the user).")] | ||
Ban, | ||
#[command(description = "Mute a user in the group (reply to the user).")] | ||
Mute, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters