Add API and room to discord

This commit is contained in:
Mylloon 2022-01-04 22:51:52 +01:00
parent 20df687c17
commit adf89e2132
Signed by: Anri
GPG key ID: A82D63DFF8D1317F

View file

@ -89,7 +89,8 @@ async fn main() {
url = url[0..url.len() - 1].to_string(); // on retire le / url = url[0..url.len() - 1].to_string(); // on retire le /
} }
let api = mattermost::connexion(&token_mattermost, &pseudo, &mot_de_passe, &url).await; // connexion à mattermost let api = mattermost::connexion(&token_mattermost, &pseudo, &mot_de_passe, &url).await; // api utilisé par mattermost
let api_discord = mattermost::connexion(&token_mattermost, &pseudo, &mot_de_passe, &url).await; // api utilisé par discord pour mattermost
// On affiche les infos d'une team // On affiche les infos d'une team
let equipe = env::var("EQUIPE").unwrap_or_else(|_| { let equipe = env::var("EQUIPE").unwrap_or_else(|_| {
@ -109,10 +110,12 @@ async fn main() {
}) })
.await; .await;
// Bloque le thread principale // Bloque le thread principale en quelque sorte
discord::start_discord(discord::ConnectionInfoDiscord { discord::start_discord(discord::ConnectionInfoDiscord {
token: token_discord, token: token_discord,
prefix, prefix,
api: api_discord,
salon: String::from("temp"),
}) })
.await; .await;
} }