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
CLIENT_ID=clientId
CLIENT_SECRET=clientSecret
CHANNELS=channelsOfBot
DEVELOPERS=userIdOfDeveloper
CHANNELS=channelsOfBot(,separated)
DEVELOPERS=userIdOfDeveloper(,separated)

View File

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

View File

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

View File

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

View File

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