Initial Commit
This commit is contained in:
commit
48a5e71e00
1136 changed files with 64347 additions and 0 deletions
15
general_commands.gd
Normal file
15
general_commands.gd
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
extends Node
|
||||
|
||||
func _ready() -> void:
|
||||
var nodes := get_children()
|
||||
for node in nodes:
|
||||
if node is TwitchCommand:
|
||||
var cmd: TwitchCommand = node
|
||||
if self.has_method("_handle_%s" % cmd.name.to_camel_case()):
|
||||
cmd.command_received.connect(Callable(self, "_handle_%s" % cmd.name.to_camel_case()))
|
||||
if self.has_method("_cooldown_%s" % cmd.name.to_camel_case()):
|
||||
cmd.command_received.connect(Callable(self, "_cooldown_%s" % cmd.name.to_camel_case()))
|
||||
|
||||
func _handle_test(_from_username: String, info: TwitchCommandInfo, _args: PackedStringArray) -> void:
|
||||
var msg: TwitchChatMessage = info.original_message
|
||||
Globals.twitcher.reply_message("Test Command Works!", msg.message_id)
|
||||
Loading…
Add table
Add a link
Reference in a new issue