feat: fixed up the changes
This commit is contained in:
parent
c79113921d
commit
cab04a068f
11 changed files with 62 additions and 47 deletions
|
@ -199,11 +199,11 @@ pub mod committee {
|
|||
|
||||
for committee in &committees {
|
||||
// get the role for this committee/club/soc
|
||||
let role = match roles_name.get(&committee.name) {
|
||||
let role = match roles_name.get(&committee.name_profile) {
|
||||
Some(x) => Some(x.to_owned()),
|
||||
None => {
|
||||
// create teh role if it does not exist
|
||||
match server.create_role(&ctx, |r| r.hoist(false).mentionable(true).name(&committee.name)).await {
|
||||
match server.create_role(&ctx, |r| r.hoist(false).mentionable(true).name(&committee.name_profile)).await {
|
||||
Ok(x) => Some(x),
|
||||
Err(_) => None,
|
||||
}
|
||||
|
@ -211,16 +211,16 @@ pub mod committee {
|
|||
};
|
||||
|
||||
// create teh channel if it does nto exist
|
||||
if !channels_name.contains_key(&committee.name) {
|
||||
if !channels_name.contains_key(&committee.name_profile) {
|
||||
match server
|
||||
.create_channel(&ctx, |c| c.name(&committee.name).kind(ChannelType::Text).category(config.committee_category))
|
||||
.create_channel(&ctx, |c| c.name(&committee.name_profile).kind(ChannelType::Text).category(config.committee_category))
|
||||
.await
|
||||
{
|
||||
Ok(x) => {
|
||||
// update teh channels name list
|
||||
channels_name.insert(x.name.to_owned(), x.to_owned());
|
||||
|
||||
println!("Created channel: {}", &committee.name);
|
||||
println!("Created channel: {}", &committee.name_profile);
|
||||
}
|
||||
Err(x) => {
|
||||
dbg!("Unable to create channel: ", x);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue