Skip to content

Commit d24f9cc

Browse files
committed
fix: twitch live announcement.. again
*sighhhhhhhhhhhhhhhhhhhhhhhhhhhhh*
1 parent d28877e commit d24f9cc

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

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.1",
5+
"version": "1.2.2",
66
"devDependencies": {
77
"@types/bun": "1.1.6"
88
},

src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,17 @@ if (!env.twitchClientSecret || env.twitchClientSecret === 'YOUR_TWITCH_CLIENT_SE
3737
throw new Error('You MUST provide a Twitch client secret in .env!');
3838
}
3939

40+
await getTwitchToken();
41+
console.log(await getStreamerName("57519051"))
42+
4043
// If everything is set up correctly, continue with the bot
4144
import { Client, GatewayIntentBits, REST, Routes, type APIApplicationCommand } from 'discord.js';
4245
import commandsMap from './commands.ts';
4346
import fs from 'fs/promises';
4447
import path from 'path';
4548
import { initTables } from './database.ts';
4649
import { getTwitchToken } from './utils/twitch/auth.ts';
50+
import { getStreamerName } from './utils/twitch/getStreamerName.ts';
4751

4852
const client = new Client({
4953
intents: [

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}> ${streamerName} is now live!` : `${streamerId.twitch_channel_id} is now live!`
85+
guild.guild_ping_role ? `<@&${guild.guild_ping_role}> ${streamerName} is now live!` : `${streamerName} is now live!`
8686
);
8787
}
8888
} else {

0 commit comments

Comments
 (0)