fixing twurple switch

This commit is contained in:
Darius
2025-09-26 15:24:52 +02:00
parent 47a4103176
commit 95693c0201
5 changed files with 11 additions and 11 deletions

View File

@@ -2,5 +2,5 @@ PREFIX=prefixLike!
BOT_USER_ID=botUserId BOT_USER_ID=botUserId
CLIENT_ID=clientId CLIENT_ID=clientId
CLIENT_SECRET=clientSecret CLIENT_SECRET=clientSecret
CHANNELS=channelsOfBot CHANNELS=channelsOfBot(,separated)
DEVELOPERS=userIdOfDeveloper DEVELOPERS=userIdOfDeveloper(,separated)

View File

@@ -15,8 +15,8 @@ export class SongCommand implements ICommand {
triggered = async ( triggered = async (
channel: string, channel: string,
user: string, user: string,
text: string, _text: string,
msg: ChatMessage, _msg: ChatMessage,
) => { ) => {
logSuccess(`${channel} song command triggered`); logSuccess(`${channel} song command triggered`);
// client.say(channel, "testing"); // client.say(channel, "testing");

View File

@@ -5,7 +5,7 @@ import { Config } from "../config/config.ts";
// Auth Token Stuff // Auth Token Stuff
const tokenData = JSON.parse( const tokenData = JSON.parse(
await fs.readFile("./tokens.125328655.json", "utf-8"), await fs.readFile(`./ tokens.${Config.bot_user_id}.json`, "utf-8"),
); );
const authProvider = new RefreshingAuthProvider({ const authProvider = new RefreshingAuthProvider({
@@ -14,9 +14,9 @@ const authProvider = new RefreshingAuthProvider({
}); });
authProvider.onRefresh( authProvider.onRefresh(
async (userId, newTokenData) => async (_userId, newTokenData) =>
await fs.writeFile( await fs.writeFile(
`./tokens.${userId}.json`, `./tokens.${Config.bot_user_id}.json`,
JSON.stringify(newTokenData, null, 4), JSON.stringify(newTokenData, null, 4),
"utf-8", "utf-8",
), ),

View File

@@ -1,4 +1,4 @@
import type { EventName } from "./registry"; import type { EventName } from "./registry.ts";
export interface IEvent { export interface IEvent {
name: EventName; name: EventName;

View File

@@ -1,7 +1,7 @@
import type { ChatClient } from "@twurple/chat"; import type { ChatClient } from "@twurple/chat";
import ConnectedEvent from "./event-connected"; import ConnectedEvent from "./event-connected.ts";
import MessageEvent from "./event-message"; import MessageEvent from "./event-message.ts";
import type { IEvent } from "./interface"; import type { IEvent } from "./interface.ts";
export const eventRegistry = { export const eventRegistry = {
message: (client: ChatClient, handler: IEvent) => message: (client: ChatClient, handler: IEvent) =>