summaryrefslogtreecommitdiff
path: root/src/consts.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/consts.rs')
-rw-r--r--src/consts.rs49
1 files changed, 49 insertions, 0 deletions
diff --git a/src/consts.rs b/src/consts.rs
index b108f34..0b12334 100644
--- a/src/consts.rs
+++ b/src/consts.rs
@@ -1,3 +1,36 @@
+#![allow(clippy::unreadable_literal)]
+use std::sync::OnceLock;
+
+use poise::serenity_prelude::{Colour, Permissions, Scope};
+
+pub fn bot_permissions() -> &'static Permissions {
+ static BOT_PERMISSIONS: OnceLock<Permissions> = OnceLock::new();
+ BOT_PERMISSIONS.get_or_init(|| {
+ Permissions::MANAGE_ROLES
+ | Permissions::MANAGE_CHANNELS
+ | Permissions::KICK_MEMBERS
+ | Permissions::BAN_MEMBERS
+ | Permissions::MANAGE_NICKNAMES
+ | Permissions::VIEW_CHANNEL
+ | Permissions::MODERATE_MEMBERS
+ | Permissions::SEND_MESSAGES
+ | Permissions::CREATE_PUBLIC_THREADS
+ | Permissions::CREATE_PRIVATE_THREADS
+ | Permissions::SEND_MESSAGES_IN_THREADS
+ | Permissions::MANAGE_MESSAGES
+ | Permissions::MANAGE_THREADS
+ | Permissions::EMBED_LINKS
+ | Permissions::ATTACH_FILES
+ | Permissions::READ_MESSAGE_HISTORY
+ | Permissions::ADD_REACTIONS
+ })
+}
+
+pub fn bot_scopes() -> &'static Vec<Scope> {
+ static BOT_SCOPES: OnceLock<Vec<Scope>> = OnceLock::new();
+ BOT_SCOPES.get_or_init(|| vec![Scope::Bot, Scope::ApplicationsCommands])
+}
+
pub const TEAMOJIS: [&str; 15] = [
"<:teawiecry:1056438041872433303>",
"<:teawiederp:1056438043109757018>",
@@ -64,3 +97,19 @@ pub const LORE: [&str; 22] = [
"Teawie is friends with BlÄhaj.",
"Consuming Teawie, and other Teawie variants is not recommended, since it will allow Teawie to take over the consumer in the same way as being shot with a Teawie \"bullet\".",
];
+
+pub enum Colors {
+ Blue,
+ Orange,
+ Red,
+}
+
+impl From<Colors> for Colour {
+ fn from(val: Colors) -> Self {
+ match val {
+ Colors::Blue => Colour::from(0x88C7FD),
+ Colors::Orange => Colour::from(0xFFB34A),
+ Colors::Red => Colour::from(0xFF5E4A),
+ }
+ }
+}