Add API and room to discord
This commit is contained in:
parent
20df687c17
commit
adf89e2132
1 changed files with 5 additions and 2 deletions
|
@ -89,7 +89,8 @@ async fn main() {
|
|||
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
|
||||
let equipe = env::var("EQUIPE").unwrap_or_else(|_| {
|
||||
|
@ -109,10 +110,12 @@ async fn main() {
|
|||
})
|
||||
.await;
|
||||
|
||||
// Bloque le thread principale
|
||||
// Bloque le thread principale en quelque sorte
|
||||
discord::start_discord(discord::ConnectionInfoDiscord {
|
||||
token: token_discord,
|
||||
prefix,
|
||||
api: api_discord,
|
||||
salon: String::from("temp"),
|
||||
})
|
||||
.await;
|
||||
}
|
||||
|
|
Reference in a new issue