Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

find channel names #97

Merged
merged 2 commits into from
Nov 20, 2020
Merged

find channel names #97

merged 2 commits into from
Nov 20, 2020

Conversation

zenril
Copy link
Collaborator

@zenril zenril commented Nov 20, 2020

No description provided.

Comment on lines +18 to +36
static getChannelNames(server, string) {
let obj = {};
const channelNames = (server.bind || []).forEach((id) => {
const channel = server.guild.channels.cache.get(id);

if (channel && channel.name) {
obj[channel.name] = id;
}

obj[id] = 'Channel Not Found';
});

if (!channelNames || !channelNames.length) {
obj = [' No Channels Bound!'];
}

return obj;
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Returns a format for the comment builder

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but its finding the names for each id

@wootosmash wootosmash merged commit 4d7904e into betabot Nov 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants