The person who reviewed my ship found out that the slash command, /ss-find didn’t work in private channels. It kept saying that you had to invite it even after you invite the bot. So:
First, I figured that since a bot can’t automatically join private channels, even after being invited, it would still throw an error that the bot is already in the channel and get stuck there. So I added an if statement to handle that scenario and basically let the bot keep going. Yet, unfortunatly this didn’t work.
Then, I added a console.log to pinpoint the exact error, and I found out that the error was method_not_supported_for_channel_type even after you invite the bot, which really dumbfounded me. Hence, I decided to ask Claude about it, and it advised to only say to invite the bot when the error ISN’T either method_not_supported_for_channel_type or already_in_channel. This helped me find out that the error is actually a missing scope, and I added the group: history scope to my bot token.
Finally, I tested /ss-find in a new channel to make sure that it said to invite the bot instead of failing. I also retested all of my slash commands in both public and private channels to be safe.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.