Stream Comment

An asset by velop
The page banner background of a mountain and forest
Stream Comment hero image

Quick Information

0 ratings
Stream Comment icon image
velop
Stream Comment

A small Godot plugin to make automated code comments easy. This was made with automating code comment point redemption on Twitch in mind. -----------Behaviour-----------Once called, StreamComment.comment will insert a comment into the currently active script, the line above where the cursor is located. If there is enough interested, other methods will be added to do things like randomly insert to the current script, or insert into any open script.To avoid annoyances while programming, StreamComment.comment will restore the current cursors position as well as any active selection.-------Usage-------Note: This plugin has been created as an editor plugin, and as such should only be activated through the editor.To add a comment to the currently acivey script, call the .comment method on the StreamComment singleton. A comment will be added to the line above the cursor.StreamComment.comment("Hello world")output: # Hello world.comment has a second, optional parameter that is a boolean to control if new line characters are escaped. By default, this parameter is true.StreamComment.comment("Hello world\nIt is I!", true)output: # Hello world\nIt is I!StreamComment.comment("Hello world\nIt is I!", false)output: # Hello world# It is I!In the event that there is no active script, .comment will return false to signal that the comment could not be placed. If you want to have the comment written to the next active script, it is possible to do so by calling .enqueue_comment as you would .comment.var comment: String = "Hello world"if !StreamComment.comment(comment): StreamComment.enqueue_comment(comment)-----------------------------Connecting to Twitch events-----------------------------This plugin was created with Twitch channel point redemptions in mind; making it simpler to automate the act of commenting on redemption. It doesn't however do the connection to Twitch's event sub API. I am however actively working with Yagich to develop https://github.com/velopteam/YATL, another Godot plugin that will greatly simplify connecting to Twitch.I've created a sample project to illustrate a basic usecase: https://github.com/velopman/godot-plugin-examples.

Supported Engine Version
3.4
Version String
1.0.0
License Version
MIT
Support Level
community
Modified Date
1 year ago
Git URL
Issue URL

A small Godot plugin to make automated code comments easy. This was made with automating code comment point redemption on Twitch in mind.


-----------
Behaviour
-----------

Once called, StreamComment.comment will insert a comment into the currently active script, the line above where the cursor is located. If there is enough interested, other methods will be added to do things like randomly insert to the current script, or insert into any open script.

To avoid annoyances while programming, StreamComment.comment will restore the current cursors position as well as any active selection.


-------
Usage
-------

Note: This plugin has been created as an editor plugin, and as such should only be activated through the editor.

To add a comment to the currently acivey script, call the .comment method on the StreamComment singleton. A comment will be added to the line above the cursor.

StreamComment.comment("Hello world")

output:
# Hello world

.comment has a second, optional parameter that is a boolean to control if new line characters are escaped. By default, this parameter is true.

StreamComment.comment("Hello world\nIt is I!", true)

output:
# Hello world\nIt is I!

StreamComment.comment("Hello world\nIt is I!", false)

output:
# Hello world
# It is I!

In the event that there is no active script, .comment will return false to signal that the comment could not be placed. If you want to have the comment written to the next active script, it is possible to do so by calling .enqueue_comment as you would .comment.

var comment: String = "Hello world"

if !StreamComment.comment(comment):
StreamComment.enqueue_comment(comment)


-----------------------------
Connecting to Twitch events
-----------------------------

This plugin was created with Twitch channel point redemptions in mind; making it simpler to automate the act of commenting on redemption. It doesn't however do the connection to Twitch's event sub API. I am however actively working with Yagich to develop https://github.com/velopteam/YATL, another Godot plugin that will greatly simplify connecting to Twitch.

I've created a sample project to illustrate a basic usecase: https://github.com/velopman/godot-plugin-examples.

Reviews

0 ratings

Your Rating

Headline must be at least 3 characters but not more than 50
Review must be at least 5 characters but not more than 500
Please sign in to add a review

Quick Information

0 ratings
Stream Comment icon image
velop
Stream Comment

A small Godot plugin to make automated code comments easy. This was made with automating code comment point redemption on Twitch in mind. -----------Behaviour-----------Once called, StreamComment.comment will insert a comment into the currently active script, the line above where the cursor is located. If there is enough interested, other methods will be added to do things like randomly insert to the current script, or insert into any open script.To avoid annoyances while programming, StreamComment.comment will restore the current cursors position as well as any active selection.-------Usage-------Note: This plugin has been created as an editor plugin, and as such should only be activated through the editor.To add a comment to the currently acivey script, call the .comment method on the StreamComment singleton. A comment will be added to the line above the cursor.StreamComment.comment("Hello world")output: # Hello world.comment has a second, optional parameter that is a boolean to control if new line characters are escaped. By default, this parameter is true.StreamComment.comment("Hello world\nIt is I!", true)output: # Hello world\nIt is I!StreamComment.comment("Hello world\nIt is I!", false)output: # Hello world# It is I!In the event that there is no active script, .comment will return false to signal that the comment could not be placed. If you want to have the comment written to the next active script, it is possible to do so by calling .enqueue_comment as you would .comment.var comment: String = "Hello world"if !StreamComment.comment(comment): StreamComment.enqueue_comment(comment)-----------------------------Connecting to Twitch events-----------------------------This plugin was created with Twitch channel point redemptions in mind; making it simpler to automate the act of commenting on redemption. It doesn't however do the connection to Twitch's event sub API. I am however actively working with Yagich to develop https://github.com/velopteam/YATL, another Godot plugin that will greatly simplify connecting to Twitch.I've created a sample project to illustrate a basic usecase: https://github.com/velopman/godot-plugin-examples.

Supported Engine Version
3.4
Version String
1.0.0
License Version
MIT
Support Level
community
Modified Date
1 year ago
Git URL
Issue URL

Open Source

Released under the AGPLv3 license

Plug and Play

Browse assets directly from Godot

Community Driven

Created by developers for developers