aboutsummaryrefslogtreecommitdiff
path: root/src/core/consts.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2020-10-26 19:03:53 -0700
committerFuwn <[email protected]>2020-10-26 19:03:53 -0700
commit9742614a1dc4699c1f2c69d923d402237672335d (patch)
treea49f7d834372f37cef06b30a28ff1b40bdfaa079 /src/core/consts.rs
parentCreate README.md (diff)
downloaddep-core-next-9742614a1dc4699c1f2c69d923d402237672335d.tar.xz
dep-core-next-9742614a1dc4699c1f2c69d923d402237672335d.zip
repo: push main from local to remote
Diffstat (limited to 'src/core/consts.rs')
-rw-r--r--src/core/consts.rs51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/core/consts.rs b/src/core/consts.rs
new file mode 100644
index 0000000..d76f2ff
--- /dev/null
+++ b/src/core/consts.rs
@@ -0,0 +1,51 @@
+use crate::db::Database;
+use serenity::model::id::{GuildId, ChannelId, RoleId};
+
+lazy_static!{
+ pub static ref DB: Database = Database::connect();
+ pub static ref LOG_TYPES: Vec<&'static str> = vec![
+ "member_ban",
+ "member_join",
+ "member_kick",
+ "member_leave",
+ "member_unban",
+ "message_delete",
+ "message_edit",
+ "nickname_change",
+ "role_change",
+ "username_change"];
+}
+
+pub const WEEK: usize = 60*60*24*7;
+pub const DAY: usize = 60*60*24;
+pub const HOUR: usize = 60*60;
+pub const MIN: usize = 60;
+
+pub const MESSAGE_CACHE: usize = 100;
+pub const SLICE_SIZE: usize = 65535;
+pub const USER_SLICE_SIZE: usize = 65535/5;
+
+pub const COMMAND_LOG: ChannelId = ChannelId(770117277416554526); // 376422940570419200
+pub const ERROR_LOG: ChannelId = ChannelId(770117277416554526); // 376422808852627457
+pub const GUILD_LOG: ChannelId = ChannelId(770117277416554526); // 406115496833056789
+pub const NOW_LIVE: RoleId = RoleId(370395740406546432);
+pub const SUPPORT_SERVER: GuildId = GuildId(704032355987488791); // 373561057639268352
+pub const TRANSCEND: GuildId = GuildId(348660188951216129);
+
+pub const SUPPORT_SERV_INVITE: &str = "https://discord.gg/ASrM7p9";
+pub const BOT_INVITE: &str = "https://discordapp.com/oauth2/authorize/?permissions=335670488&scope=bot&client_id=699473263998271489";
+// pub const GITLAB_LINK: &str = "https://gitlab.com/fuwn/wisp";
+// pub const PATREON_LINK: &str = "https://www.patreon.com/wisp";
+
+pub const API_FAIL: &str = "Failed to get API";
+pub const CACHE_CHANNEL_FAIL: &str = "Failed to get channel lock from CACHE";
+pub const CACHE_GUILD_FAIL: &str = "Failed to get guild lock from CACHE";
+pub const DB_GUILD_FAIL: &str = "Failed to select Guild";
+pub const DB_GUILD_DEL_FAIL: &str = "Failed to delete Guild";
+pub const DB_GUILD_ENTRY_FAIL: &str = "Failed to insert Guild";
+pub const DB_USER_ENTRY_FAIL: &str = "Failed to insert User";
+pub const GUILD_FAIL: &str = "Failed to get Guild";
+pub const GUILDID_FAIL: &str = "Failed to get GuildId";
+pub const MEMBER_FAIL: &str = "Failed to get member";
+pub const TC_FAIL: &str = "Failed to get TimerClient";
+pub const USER_FAIL: &str = "Failed to get user";