-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
38 additions
and
66 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,10 @@ | ||
const discord = require('discord.js'); | ||
import * as discord from 'discord.js'; | ||
import { discordConfig, logger } from '../config'; | ||
|
||
const discordConfig = require('../config/discord'); | ||
|
||
const discordClient = new discord.Client(); | ||
export const discordClient = new discord.Client(); | ||
discordClient.login(discordConfig.token); | ||
|
||
discordClient.on('ready', () => { | ||
logger.info('Connected to Discord'); | ||
logger.info(`Logged in as: ${discordClient.user.tag} - (${discordClient.user.id})`); | ||
}); | ||
|
||
module.exports = { | ||
discordClient | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,7 @@ | ||
const mqtt = require('mqtt'); | ||
import * as mqtt from 'mqtt'; | ||
import { mqttConfig, logger } from '../config'; | ||
|
||
const mqttConfig = require('../config/mqtt'); | ||
|
||
const mqttClient = mqtt.connect(`tcp://${mqttConfig.address}`); | ||
export const mqttClient = mqtt.connect(`tcp://${mqttConfig.address}`); | ||
mqttClient.on('connect', () => { | ||
logger.info('Connected to MQTT Broker'); | ||
}); | ||
|
||
module.exports = { | ||
mqttClient | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,13 @@ | ||
const OBSWebSocket = require('obs-websocket-js'); | ||
import * as OBSWebSocket from 'obs-websocket-js'; | ||
import { logger } from '../config'; | ||
|
||
let obsConnected = false; | ||
const obsClient = new OBSWebSocket(); | ||
export let obsConnected = false; | ||
export const obsClient = new OBSWebSocket(); | ||
obsClient.on('ConnectionOpened', () => { | ||
obsConnected = true; | ||
logger.info('Connected to OBSWebSocket'); | ||
}); | ||
obsClient.on('ConnectionClosed', () => { | ||
obsConnected = false; | ||
logger.info('Disconnected from OBSWebSocket'); | ||
}); | ||
|
||
module.exports = { | ||
obsClient, | ||
obsConnected | ||
}; | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,5 @@ | ||
const tmi = require('tmi.js'); | ||
import * as tmi from 'tmi.js'; | ||
import { twitchConfig } from '../config'; | ||
|
||
const tmiConfig = require('../config/twitch'); | ||
|
||
const twitchClient = new tmi.client(tmiConfig); | ||
twitchClient.connect(); | ||
|
||
module.exports = { | ||
twitchClient | ||
}; | ||
export const twitchClient = new tmi.client(twitchConfig); | ||
twitchClient.connect(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters