I’m trying to have my bot run on a timer and run advertisements every X seconds, but it says I don’t have permission.
It does have editor permissions in the channel that it’s trying to run ads in.
I’m trying to have my bot run on a timer and run advertisements every X seconds, but it says I don’t have permission.
It does have editor permissions in the channel that it’s trying to run ads in.
iirc the limit is once per 8 minutes, so doing it “every x seconds” sounds like you might be trying to run too quickly
You’ll also probably get better mileage calling the API instead of via chat
I should’ve been clear but that’s how the timer is declared, and it’s trying to be run every hour so that’s definitely not the issue. I get “no_permission” as an error. Both with the tmi.js function and using a regular chat command.
I know the API has a function for it, but I was hoping to use the chat version since it should technically work and it’s one less API call to be making.
The account your bot is using to connect to chat with, is it the broadcasters account or a separate account?
Separate account with editor privileges.
That could be the reason then. It’s been quite a while since I did some testing but IIRC to start commands through chat can only be done by the broadcaster account. The documentation about starting ads is erroneous in places.
Ah gotcha. A staff member had recommended to me to use the chat command for the bot so I figured it worked as long as they were an editor. Guess I’ll just have to stick with the API!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.