Skip to content

Commit

Permalink
Add role mention to vlivenotif list
Browse files Browse the repository at this point in the history
  • Loading branch information
drklee3 committed May 4, 2018
1 parent 8034cd5 commit fe77807
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/commands/search/vlive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,13 @@ command!(vlivenotif_list(ctx, msg, _args) {
let mut s = String::new();

for channel in channels {
let _ = writeln!(s, "<#{}> - [{}](http://channels.vlive.tv/{})",
channel.discord_channel, channel.channel_name, channel.channel_code);
if let Some(role) = channel.mention_role {
let _ = writeln!(s, "<#{}> - [{}](http://channels.vlive.tv/{}) (mentions <@&{}>)",
channel.discord_channel, channel.channel_name, channel.channel_code, role);
} else {
let _ = writeln!(s, "<#{}> - [{}](http://channels.vlive.tv/{})",
channel.discord_channel, channel.channel_name, channel.channel_code);
}
}

let _ = msg.channel_id.send_message(|m| m
Expand Down

0 comments on commit fe77807

Please sign in to comment.