Skip to content

Commit

Permalink
add channel name for thread
Browse files Browse the repository at this point in the history
  • Loading branch information
cm-ayf committed Aug 31, 2021
1 parent 99696ba commit f360786
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,14 @@ client.on('messageCreate', msg => {
name = target.author.username;
}

let channel_name;
let channel_name = '';
if (cnl.parent.parent) {
channel_name += cnl.parent.parent.name + ' > ';
}
if (cnl.parent) {
channel_name = cnl.parent.name + ' > ' + cnl.name;
}else{
channel_name = cnl.name;
channel_name += cnl.parent.name + ' > ';
}
channel_name += cnl.name;

let msgembed = new MessageEmbed({
author: {
Expand Down

0 comments on commit f360786

Please sign in to comment.