richfromm / slack2discord

A Discord client that imports Slack-exported JSON chat history to Discord channel(s).
GNU General Public License v3.0
8 stars 3 forks source link

provide channel name rather than id #6

Closed richfromm closed 2 years ago

richfromm commented 2 years ago

this is much more user friendly you don't have to enable developer mode and right click in the GUI

use discord.Client.get_all_channels() then iterate through all and find the one with the matching .name there should only be 1 if there are more than 1, arbitrarily pick the first

we expect this to be a TextChannel if it's not, just warn, but keep going

no longer calling discord.Client.get_channel(id) but it's the same intent needed (guilds=True) for both that and get_all_channels()