Skip to content

Commit 880bd2b

Browse files
committed
added links to twitch notifications
1 parent 0343c08 commit 880bd2b

File tree

5 files changed

+17
-5
lines changed

5 files changed

+17
-5
lines changed

.env.example

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,4 +21,6 @@ TWITCH_CLIENT_ID='YOUR_TWITCH_CLIENT_ID'
2121
TWITCH_CLIENT_SECRET='YOUR_TWITCH_CLIENT_SECRET'
2222

2323
# Configuration
24-
CONFIG_UPDATE_INTERVAL='60'
24+
CONFIG_UPDATE_INTERVAL_YOUTUBE='10'
25+
CONFIG_UPDATE_INTERVAL_TWITCH='2'
26+
CONFIG_DISCORD_LOGS_CHANNEL='YOUR_DISCORD_LOGS_CHANNEL'

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "videonotifier",
33
"module": "src/index.ts",
44
"type": "module",
5-
"version": "1.2.2",
5+
"version": "1.2.3",
66
"devDependencies": {
77
"@types/bun": "1.1.6"
88
},

src/utils/logging.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// WIP
2+
// TODO: Work on
3+
4+
export async function logMessageYouTube(channelName: string, channelId: string, guildName: string, guildId: string) {
5+
console.log(`❤️ [YouTube] Sent upload message to ${guildName} (${guildId}) for channel ${channelName} (${channelId})`);
6+
}
7+
8+
export async function logMessageTwitch(channelName: string, channelId: string, guildName: string, guildId: string) {
9+
console.log(`💜 [Twitch] Sent live message to ${guildName} (${guildId}) for channel ${channelName} (${channelId})`);
10+
}

src/utils/twitch/checkIfStreamerIsLive.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export async function checkIfStreamersAreLive(): Promise<void> {
8282
// Send a message to the channel
8383
const channel = await client.channels.fetch(guild.guild_channel_id);
8484
await (channel as TextChannel).send(
85-
`${guild.guild_ping_role ? `<@&${guild.guild_ping_role}>` : null} ${streamerName} is now live!`
85+
`${guild.guild_ping_role ? `<@&${guild.guild_ping_role}>` : ''} ${streamerName} is now live <https://twitch.tv/${streamerName}>!`
8686
);
8787
}
8888
} else {

0 commit comments

Comments
 (0)