Skip to content

Commit

Permalink
Merge branch 'main' of github.com:BarryCarlyon/twitch_misc
Browse files Browse the repository at this point in the history
  • Loading branch information
BarryCarlyon committed Jun 28, 2023
2 parents aaa5c6f + 79bf3f0 commit db6833c
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 21 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/publish-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ jobs:
with:
persist-credentials: false

- name: Deploy Index 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: github

- name: Deploy Implicit Auth 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
Expand All @@ -30,13 +37,6 @@ jobs:
target-folder: authentication/electron/webpage
clean: true

- name: Deploy Index 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: github

- name: Deploy Examples 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
Expand Down
10 changes: 5 additions & 5 deletions eventsub/websockets/web/charity/index.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<html>

<head>
<title>EventSub Websockets with Implicit Auth Example</title>
<title>Charity EventSub Websockets with Implicit Auth Example</title>
<link rel="stylesheet" href="/twitch_misc/style.css" />

<style>
Expand Down Expand Up @@ -232,10 +232,10 @@

function requestHooks(user_id) {
let topics = {
'channel.charity_campaign.start': { version: 'beta', condition: { broadcaster_user_id: user_id } },
'channel.charity_campaign.progress': { version: 'beta', condition: { broadcaster_user_id: user_id } },
'channel.charity_campaign.stop': { version: 'beta', condition: { broadcaster_user_id: user_id } },
'channel.charity_campaign.donate': { version: 'beta', condition: { broadcaster_user_id: user_id } },
'channel.charity_campaign.start': { version: '1', condition: { broadcaster_user_id: user_id } },
'channel.charity_campaign.progress': { version: '1', condition: { broadcaster_user_id: user_id } },
'channel.charity_campaign.stop': { version: '1', condition: { broadcaster_user_id: user_id } },
'channel.charity_campaign.donate': { version: '1', condition: { broadcaster_user_id: user_id } },
}

log(`Spawn Topics for ${user_id}`);
Expand Down
4 changes: 2 additions & 2 deletions eventsub/websockets/web/eventsub.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
class initSocket {
counter: 0,
counter = 0
closeCodes = {
4000: 'Internal Server Error',
4001: 'Client sent inbound traffic',
Expand Down Expand Up @@ -29,7 +29,7 @@ class initSocket {
log(`Connecting to ${url}|${is_reconnect}`);
this.eventsub = new WebSocket(url);
this.eventsub.is_reconnecting = is_reconnect;
this.eventsub.counter = counter;
this.eventsub.counter = this.counter;

this.eventsub.addEventListener('open', () => {
log(`Opened Connection to Twitch`);
Expand Down
10 changes: 5 additions & 5 deletions examples/guest_star/obs_assist/README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
## What is this example

This is an exmaple tool to help streamers interact Guest Start with OBS 29+
This is an example tool to help streamers interact Guest Start with OBS 29+

## Instruction for Use

- Connect to OBS

First it'll ask you to connect to OBS 29+ via OBS WebSocket.
So you will need to have configured the OBS WebSocket if you have no already.
So you will need to have configured the OBS WebSocket if you have not already.

- Select a Scene

Then Select a Scene to operate against

- Login with Twitch

Click on Connect with Twitch to autheticate, it'll request Read Only permission for your Guest Star settings.
Click on Connect with Twitch to autheticate, it'll request Read Only permission for your channels Guest Star settings.

- Add/Remove Slots

Expand All @@ -24,7 +24,7 @@ It'll see how many Slots you have configured on Guest Star, and provide Add/Remo
- Click Add or Remove

This button will then add (or remove) a browser source to the selected OBS scene.
It'll be 640x360 with OBS Controls Volume enabled.
It'll be 640x360 with "OBS Controls Volume" enabled.

You'll then want to move it in OBS as needed (or resize)

Expand All @@ -49,4 +49,4 @@ The following Requests from [OBS Websocket Protocol](https://github.com/obsproje
- [GetSceneList](https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#getscenelist) - to get what scenes you have
- [GetInputList](https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#getinputlist) - to see what inputs you have
- [CreateInput](https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#createinput) - to add/create a Guest Star Slot into OBS
- [RemoveInput](https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#removeinput) - to remove/delete a Guest Star Slot into OBS
- [RemoveInput](https://github.com/obsproject/obs-websocket/blob/master/docs/generated/protocol.md#removeinput) - to remove/delete a Guest Star Slot into OBS
2 changes: 1 addition & 1 deletion examples/token_checker/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ <h2>Output</h2>
let rightcell = document.createElement('td');
row.append(rightcell);

if (key == 'scopes') {
if (key == 'scopes' && resp[key] !== null) {
let ul = document.createElement('ul');
rightcell.append(ul);
for (let x=0;x<resp[key].length;x++) {
Expand Down
5 changes: 4 additions & 1 deletion extensions/chat/send_chat.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,14 +45,17 @@ fetch(
})
}
)
.then(resp => {
.then(async resp => {
// console log out the useful information
// keeping track of rate limits is important
// you can only set the config 12 times a minute per segment
console.error('Send Chat OK', resp.status, resp.headers.get('ratelimit-remaining'), '/', resp.headers.get('ratelimit-limit'));

// we don't care too much about the statusCode here
// but you should test it for a 204
if (resp.status != 204) {
console.error('Send Chat Error', await resp.text());
}
})
.catch(err => {
console.error(err);
Expand Down

0 comments on commit db6833c

Please sign in to comment.