Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions addons/twitcher/chat/twitch_auto_message.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
extends Node
extends Twitcher

## Experimental: Node is not stable yet. For suggestions and feedback please use discord.
## Experimental: Node is not stable yet. For suggestions and feedback please use discord.
class_name TwitchAutoMessage

static var all_rotational_messages: Array[TwitchAutoMessage] = []
Expand All @@ -27,22 +27,22 @@ var last_send: int

func _enter_tree() -> void:
all_rotational_messages.append(self)


func _exit_tree() -> void:
all_rotational_messages.erase(self)


func send() -> void:
var color: TwitchAnnouncementColor = TwitchAnnouncementColor.all_colors[announcement_color]
if use_bot:

if use_bot:
if announcement:
TwitchBot.announcement(message, color, source_only, broadcaster)
else:
TwitchBot.chat(message, "", source_only, broadcaster)
return

if not broadcaster: broadcaster = await TwitchService.get_current_user_via_api(TwitchAPI.instance)
if not sender: sender = broadcaster
if announcement:
Expand Down
10 changes: 5 additions & 5 deletions addons/twitcher/chat/twitch_auto_messenger.gd
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
extends Node
extends Twitcher

## Experimental: Node is not stable yet. For suggestions and feedback please use discord.
## Used to send the twitch_auto_messages
Expand All @@ -7,7 +7,7 @@ class_name TwitchAutoMessenger
## The minimal delay between the messages
@export var delay_in_s: float = 300:
set = _update_delay_in_s

## The minimal amount of messages before a new message got triggered
@export var min_messages: int = -1

Expand Down Expand Up @@ -41,8 +41,8 @@ func _on_event(event: TwitchEventsub.Event) -> void:
if message.broadcaster_user_id == broadcaster_to_listen.id:
_current_message_sent += 1
_check_to_send()


func _on_timer_timeout() -> void:
_timer_ready = true
_check_to_send()
Expand All @@ -61,7 +61,7 @@ func _fill_bag() -> void:

func _send_message() -> void:
if _bag.is_empty(): _fill_bag()

_bag.shuffle()
var message: TwitchAutoMessage = _bag.pop_back()
message.send()
Expand Down
2 changes: 1 addition & 1 deletion addons/twitcher/chat/twitch_bot.gd
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
@icon("res://addons/twitcher/assets/chat-bot-icon.svg")
@tool
extends Node
extends Twitcher

## Helper to send messages with a second bot user and the corrosponding bot badge.
## Take care that setup is needed that it actually works! The right scopes for the target channel
Expand Down
Loading