Skip to content

Commit

Permalink
Fix Twitch access token check and update Twitch
Browse files Browse the repository at this point in the history
avatar URL fetching
  • Loading branch information
adan-ea committed Nov 24, 2023
1 parent d2720a4 commit ff38209
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/twitchLive/tasks/twitchAlert.cron.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const streamersList = new Map<string, LiveStatus>();
export default function (): cron.ScheduledTask {
return cron.schedule('* * * * *', () => {
try {
if (!twitch.access_token) return; //logger.warn('Twitch access token is not defined');
if (!twitch.access_token) return logger.warn('Twitch access token is not defined');
for (const guild of guildsCache) {
handleGuild(guild);
}
Expand Down Expand Up @@ -142,8 +142,8 @@ export const sendLiveEmbed = async (streamData: Stream, twitchLive: ITwitchLive,
) as TextChannel;
if (!channel) return;

const twitchAvatarURL: string = await (
// @ts-ignore
const twitchAvatarURL: string = await // @ts-ignore
(
await fetch(`https://decapi.me/twitch/avatar/${user_name}`)
).text();

Expand Down

0 comments on commit ff38209

Please sign in to comment.