give data
This commit is contained in:
parent
b6719aee2f
commit
74fb2fe396
1 changed files with 20 additions and 7 deletions
19
src/main.rs
19
src/main.rs
|
@ -106,16 +106,29 @@ async fn main() {
|
||||||
// Tâche en paralèlle
|
// Tâche en paralèlle
|
||||||
mattermost::start_mattermost(mattermost::ConnectionInfoWebsocket {
|
mattermost::start_mattermost(mattermost::ConnectionInfoWebsocket {
|
||||||
api,
|
api,
|
||||||
token: token_mattermost, /* , prefix */
|
token: token_mattermost.clone(), /* , prefix */
|
||||||
})
|
})
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
|
/* On créer notre structure avec les identifiants Mattermost
|
||||||
|
* que notre fichier Discord à besoin pour envoyer des message
|
||||||
|
* sur Mattermost. */
|
||||||
|
let id = discord::IdentifiantsMattermost {
|
||||||
|
token: token_mattermost,
|
||||||
|
user: pseudo,
|
||||||
|
pass: mot_de_passe,
|
||||||
|
url,
|
||||||
|
};
|
||||||
|
|
||||||
// Bloque le thread principale en quelque sorte
|
// 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,
|
api: api_discord,
|
||||||
salon: String::from("temp"),
|
salon: String::from("temp"),
|
||||||
})
|
},
|
||||||
|
id,
|
||||||
|
)
|
||||||
.await;
|
.await;
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue