fixing twurple switch
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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",
|
||||
),
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { EventName } from "./registry";
|
||||
import type { EventName } from "./registry.ts";
|
||||
|
||||
export interface IEvent {
|
||||
name: EventName;
|
||||
|
||||
@@ -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) =>
|
||||
|
||||
Reference in New Issue
Block a user