Skip to content

Commit fc375c1

Browse files
committed
Remove chat API debugging and added some connect fix.
1 parent c971535 commit fc375c1

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vip-controller",
3-
"version": "0.0.1",
3+
"version": "0.0.2",
44
"description": "An app to help Twitch Partners automate VIP redemption and removal.",
55
"main": "./dist/main/index.js",
66
"scripts": {

src/main/mainWindow.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const DEV_SERVER_URL = process.env.DEV_SERVER_URL // eslint-disable-line prefer-
88
const winHandler = new BrowserWinHandler({
99
height: 500,
1010
width: 400,
11-
resizable: false,
11+
resizable: (isDev ? true : false),
1212
})
1313

1414
winHandler.onCreated(browserWindow => {

src/renderer/pages/index.vue

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ async function init () {
124124
twitchAPI = new ApiClient({ authProvider })
125125
126126
chatAPI = new tmi.Client({
127-
options: { debug: true, messagesLogLevel: "info" },
128127
connection: {
129128
reconnect: true,
130129
secure: true
@@ -169,13 +168,13 @@ async function appInit () {
169168
}
170169
171170
export default {
172-
async created() {
171+
created() {
173172
if (!this.accessToken) {
174173
return this.$router.push('/login')
175174
}
176175
177176
initDB()
178-
await init()
177+
init()
179178
},
180179
data () {
181180
return {
@@ -190,6 +189,10 @@ export default {
190189
this.$nuxt.error({ statusCode: err.body.status, message: err.body.message })
191190
})
192191
192+
if (rewards === undefined) {
193+
return this.$nuxt.error({ statusCode: 403, message: "Channel points are not available for the broadcaster" })
194+
}
195+
193196
this.rewards = rewards
194197
},
195198
computed: {
@@ -215,6 +218,10 @@ export default {
215218
return
216219
}
217220
221+
if (chatAPI == null) {
222+
init()
223+
}
224+
218225
appInit()
219226
220227
this.started = true

0 commit comments

Comments
 (0)