generated from Oliver/discord-bot-template
Fix message counting logic
This commit is contained in:
parent
79638ed324
commit
b7c9a9b0e3
@ -169,6 +169,7 @@ impl Server {
|
||||
fn walk(this: &Vec<Channel>) -> usize {
|
||||
let mut total = 0;
|
||||
for channel in this {
|
||||
total += channel.messages.len();
|
||||
total += walk(&channel.children);
|
||||
};
|
||||
total
|
||||
|
Loading…
Reference in New Issue
Block a user