fixing twurple switch
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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");
|
||||||
|
|||||||
@@ -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",
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|||||||
@@ -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) =>
|
||||||
|
|||||||
Reference in New Issue
Block a user