{"id":13758348,"url":"https://github.com/drtwisted/godot-twicil","last_synced_at":"2025-05-10T08:30:22.796Z","repository":{"id":102391337,"uuid":"120606001","full_name":"drtwisted/godot-twicil","owner":"drtwisted","description":"Godot TwiCIL – Godot Twitch Chat Interaction Layer","archived":false,"fork":false,"pushed_at":"2023-07-31T10:37:48.000Z","size":63,"stargazers_count":65,"open_issues_count":3,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-11-16T15:37:37.300Z","etag":null,"topics":["extension","gdscript","godot","godot-engine","interaction","irc","twitch"],"latest_commit_sha":null,"homepage":"","language":"GDScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/drtwisted.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-07T11:23:07.000Z","updated_at":"2024-10-06T14:38:46.000Z","dependencies_parsed_at":null,"dependency_job_id":"fac8d96c-6f0b-459f-bf48-cf5fcf465d73","html_url":"https://github.com/drtwisted/godot-twicil","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drtwisted%2Fgodot-twicil","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drtwisted%2Fgodot-twicil/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drtwisted%2Fgodot-twicil/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/drtwisted%2Fgodot-twicil/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/drtwisted","download_url":"https://codeload.github.com/drtwisted/godot-twicil/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253389373,"owners_count":21900749,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["extension","gdscript","godot","godot-engine","interaction","irc","twitch"],"created_at":"2024-08-03T13:00:28.083Z","updated_at":"2025-05-10T08:30:22.307Z","avatar_url":"https://github.com/drtwisted.png","language":"GDScript","funding_links":[],"categories":["Libraries"],"sub_categories":["GDScript"],"readme":"# Godot TwiCIL -- Godot Twitch Chat Interaction Layer\n\u003cimg src=\"./godot-twicil-icon.png\" height=100px/\u003e\n\n\n## NOTE: ATM `master` branch contains TwiCIL `v1.3.0-legacy` (for Godot 2.x), latest changes brouhgt with `v2.0.0` are at [godot3.1](https://github.com/drtwisted/godot-twicil/tree/godot3.1) branch. In the future things will switch around.\n\n### Description\nAn abstraction layer for Godot Engine to enable interaction with twitch chat.\n\nA basic explanation is available in this video (1.5x speed is recomended :D)\n\n\n[![GodotTwiCIL Brief Tutorial](https://i.ytimg.com/vi/tYYCjMOxKEI/hqdefault.jpg)](https://youtu.be/tYYCjMOxKEI)\n\n### TODO:\n* Implement secure connection over WS for 3.1.x (should have built in tools for the purpose)\n* ~~Add aliases for chat commands~~\n* Manage user states (~~connected~~/~~disconnected~~/banned users?)\n* Investigate if it's possible to actively ask server for user list (at least add update of users list on new message)\n* Implement retrieval of emote images\n\n### How to use\n1. Create your Twitch API application [here](https://dev.twitch.tv/dashboard/apps/create)\n2. Generate a new OAUTH-Token [here](https://twitchapps.com/tmi/)\n\nAssuming you have added ***TwiCIL*** node to your scene:\n```\nonready var twicil = get_node(\"TwiCIL\")\n\nvar nick = \"MySuperGame\"\nvar client_id = \"myClient1D\"\nvar oauth = \"oauth:my0auTh\"\nvar channel = \"channel_name\"\n\nfunc _setup_twicil():\n  twicil.connect_to_twitch_chat()\n  twicil.connect_to_channel(channel, client_id, oauth, nick)\n  \n  # Enable logging (disabled by default)\n  twicil.set_logging(true)\n  \n  # Add custom commands to game bot\n  twicil.commands.add(\"hi\", self, \"_command_say_hi\", 0)\n  twicil.commands.add(\"bye\", self, \"_command_say_bye_to\", 1)\n  twicil.commands.add(\"!w\", self, \"_command_whisper\", 0)\n\n  # Add some aliases\n  twicil.commands.add_aliases(\"hi\", [\"hello\", \"hi,\", \"hello,\", \"bye\"])\n  \n  # Remove command/alias\n  twicil.commands.remove(\"bye\")\n\nfunc _command_say_hi(params):\n  var sender = params[0]\n  \n  twicil.send_message(str(\"Hello, @\", sender))\n\nfunc _command_say_bye_to(params):\n  var sender = params[0]\n  var recipient = params[1]\n  \n  twicil.send_message(str(\"@\", recipient, \", \", sender, \" says bye! TwitchUnity\"))\n\nfunc _command_whisper(params):\n  var sender = params[0]\n  \n  twicil.send_whisper(sender, \"Boo!\")\n\nfunc _ready():\n  _setup_twicil()\n\n```\n\n### API\n\n#### Methods\n|Method|Params|Description|\n|-|-|-|\n|**connect_to_twitch_chat**| -- | Establishes connection to Twitch IRC Chat Server|\n|**connect_to_channel**|**channel** -- channel name to connect to; **client_id** -- your *client_id* obtained from Twitch Developer Dashboard; **password** -- your *oauth code* obtained from Twitch Developer Dashboard; **nickname** -- nickname of account your app will be authorized in chat; **realname** (optional) -- not quite sure if it's necessary, but can be the same as *nickname*;  | Joins specified chat using provided credentials|\n|**set_logging**|**state** -- boolean state| Enable/disable logging communication with server to stdout|\n|**connect_to_host**|**host** -- host IP or FDQN; **port** -- host port| Establishes connection to specified host:port|\n|**send_command**|**command** -- raw text which is sent| Sends specified command/text directly to the server|\n|**send_message**|**text** -- message text| Sends a regular message to the chat|\n|**send_whisper**|**recipient** -- has to be a valid user name; **text** -- message text| Whispers (PM) a message to the specified user|\n\n\n#### Signals\n|Signal|Params|Description|\n|-|-|-|\n|**message_recieved**|**sender** -- sender nickname; **text** -- message text| Emitted on new messages sent to chat|\n|**raw_response_recieved**|**response** -- raw response from Twitch IRC server| Emitted on any response from Twitch IRC server received|\n|**user_appeared**|**user** -- user nickname|Emitted on user join notification received from server. NOTE: this has a server delay of several minutes|\n|**user_disappeared**|**user** -- user nickname|Emitted on user part notification received from server. NOTE: this has a server delay of several minutes|\n\n\n#### Manage interactive commands\n\n|Method|Params|Description|\n|-|-|-|\n|***commands.*** **add**|**chat_command** -- command text to react to; **target** -- target object on which method_name will be invoked; **method_name** -- method name to be invoked on the target object; **params_count**=1 -- parameters the command expects to be accepted as valid (optional param, default is 1); **variable_params_count**=false -- indicates if command can be called with any params count including none (optional param, default is false -- params count is mandatory). **NOTE:** Params are sent to callback as a list. First list member is ALWAYS sender nickname. See example ***godot-twicil-example.gd***)| Add command text **chat_command** to trigger **method_name** on **target** object and count command valid if **params_count** amount of params is specified, or call it in any case if **variable_params_count** is set to *true*|\n|***commands.*** **add_aliases**|**chat_command** -- command text alias(es) is/are set to; **aliases** --  a list of aliases to add to reaction of chat_command | Add aliases to chat_command to list of reactions. |\n|***commands.*** **remove**|**chat_command** -- command (or alias) text reaction is set to| Remove command (or alias) from list of reactions |\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrtwisted%2Fgodot-twicil","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdrtwisted%2Fgodot-twicil","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdrtwisted%2Fgodot-twicil/lists"}