forked from crowbartools/Firebot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v5' of https://github.com/crowbartools/Firebot into JP_…
…TRANSLATION_5.62.0 # Conflicts: # package.json # src/gui/app/controllers/commands.controller.js
- Loading branch information
Showing
52 changed files
with
1,639 additions
and
229 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import { EffectType } from "../../../../types/effects"; | ||
import { EffectCategory } from "../../../../shared/effect-constants"; | ||
import twitchApi from "../../../twitch-api/api"; | ||
import adManager from "../../../twitch-api/ad-manager"; | ||
|
||
const model: EffectType = { | ||
definition: { | ||
id: "twitch:snooze-ad-break", | ||
name: "Snooze Next Ad Break", | ||
description: "Pushes back the next scheduled mid-roll ad break by 5 minutes", | ||
icon: "fad fa-snooze", | ||
categories: [ | ||
EffectCategory.COMMON, | ||
EffectCategory.MODERATION, | ||
EffectCategory.TWITCH | ||
], | ||
dependencies: { | ||
twitch: true | ||
} | ||
}, | ||
optionsTemplate: ` | ||
<eos-container> | ||
<div class="effect-info alert alert-warning"> | ||
Note: You must be an affiliate or partner to use this effect. | ||
Also, Twitch limits the number of times you may snooze mid-roll ads. | ||
If you have snoozed ads too many times in a short period, Twitch will deny this. | ||
</div> | ||
</eos-container> | ||
`, | ||
optionsController: () => {}, | ||
optionsValidator: () => { | ||
return []; | ||
}, | ||
onTriggerEvent: async () => { | ||
const result = await twitchApi.channels.snoozeAdBreak(); | ||
|
||
if (result === true) { | ||
await adManager.runAdCheck(); | ||
} | ||
|
||
return result; | ||
} | ||
}; | ||
|
||
module.exports = model; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.