feat: channel model implementation (#250)

Co-authored-by: ToastXC <100072983+toastxc@users.noreply.github.com>
This commit is contained in:
Paul Makles
2023-06-04 18:52:49 +01:00
committed by GitHub
parent 3c834d06d4
commit bf3e027067
27 changed files with 1391 additions and 99 deletions

View File

@@ -3,7 +3,8 @@ use std::{collections::HashMap, sync::Arc};
use futures::lock::Mutex;
use crate::{
AccountStrike, Bot, File, Member, MemberCompositeKey, Server, User, UserSettings, Webhook,
AccountStrike, Bot, Channel, File, Member, MemberCompositeKey, Server, User, UserSettings,
Webhook,
};
database_derived!(
@@ -18,13 +19,12 @@ database_derived!(
pub server_members: Arc<Mutex<HashMap<MemberCompositeKey, Member>>>,
pub servers: Arc<Mutex<HashMap<String, Server>>>,
pub files: Arc<Mutex<HashMap<String, File>>>,
pub server_bans: Arc<Mutex<HashMap<String, ()>>>,
pub safety_reports: Arc<Mutex<HashMap<String, ()>>>,
pub safety_snapshots: Arc<Mutex<HashMap<String, ()>>>,
pub emoji: Arc<Mutex<HashMap<String, ()>>>,
pub messages: Arc<Mutex<HashMap<String, ()>>>,
pub channels: Arc<Mutex<HashMap<String, ()>>>,
pub channels: Arc<Mutex<HashMap<String, Channel>>>,
pub channel_invites: Arc<Mutex<HashMap<String, ()>>>,
pub channel_unreads: Arc<Mutex<HashMap<String, ()>>>,
}