# Can't Run Ads w/ Chat Command

**URL:** <https://discuss.dev.twitch.com/t/cant-run-ads-w-chat-command/25103>\
**Category:** Chat and IRC\
**Created:** [April 21, 2020, 8:16pm UTC](https://discuss.dev.twitch.com/t/cant-run-ads-w-chat-command/25103 "2020-04-21T20:16:25Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![smokey019](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@smokey019](https://discuss.dev.twitch.com/u/smokey019)\
**Post date:** [April 21, 2020, 8:16pm UTC](https://discuss.dev.twitch.com/t/cant-run-ads-w-chat-command/25103/1 "2020-04-21T20:16:25Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![BarryCarlyon](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/barrycarlyon/32/253_2.png) [@BarryCarlyon](https://discuss.dev.twitch.com/u/BarryCarlyon)\
**Post date:** [April 22, 2020, 12:11am UTC](https://discuss.dev.twitch.com/t/cant-run-ads-w-chat-command/25103/2 "2020-04-22T00:11:35Z")

</div>

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

> **[Reference](https://dev.twitch.tv/docs/api/reference/)**
>
> Twitch Developer tools and services to integrate Twitch into your development or create interactive experience on twitch.tv.

---

<div class="post-metadata">

**Author:** ![smokey019](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@smokey019](https://discuss.dev.twitch.com/u/smokey019)\
**Post date:** [April 22, 2020, 12:24am UTC](https://discuss.dev.twitch.com/t/cant-run-ads-w-chat-command/25103/3 "2020-04-22T00:24:14Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Dist](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/dist/32/7192_2.png) [@Dist](https://discuss.dev.twitch.com/u/Dist)\
**Post date:** [April 22, 2020, 12:30am UTC](https://discuss.dev.twitch.com/t/cant-run-ads-w-chat-command/25103/4 "2020-04-22T00:30:19Z")

</div>

The account your bot is using to connect to chat with, is it the broadcasters account or a separate account?

---

<div class="post-metadata">

**Author:** ![smokey019](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@smokey019](https://discuss.dev.twitch.com/u/smokey019)\
**Post date:** [April 22, 2020, 12:31am UTC](https://discuss.dev.twitch.com/t/cant-run-ads-w-chat-command/25103/5 "2020-04-22T00:31:49Z")

</div>

Separate account with editor privileges.

---

<div class="post-metadata">

**Author:** ![Dist](https://d3ovvz0v2ajtpu.cloudfront.net/user_avatar/discuss.dev.twitch.com/dist/32/7192_2.png) [@Dist](https://discuss.dev.twitch.com/u/Dist)\
**Post date:** [April 22, 2020, 12:35am UTC](https://discuss.dev.twitch.com/t/cant-run-ads-w-chat-command/25103/6 "2020-04-22T00:35:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![smokey019](https://avatars.discourse-cdn.com/v4/letter/s/df788c/32.png) [@smokey019](https://discuss.dev.twitch.com/u/smokey019)\
**Post date:** [April 22, 2020, 12:38am UTC](https://discuss.dev.twitch.com/t/cant-run-ads-w-chat-command/25103/7 "2020-04-22T00:38:18Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![system](https://d2opxh93rbxzdn.cloudfront.net/original/2X/0/05909729875cce3b53e59d5561c4d23bb14948fc.png) [@system](https://discuss.dev.twitch.com/u/system)\
**Post date:** [May 22, 2020, 12:38am UTC](https://discuss.dev.twitch.com/t/cant-run-ads-w-chat-command/25103/8 "2020-05-22T00:38:21Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
