Skip to content

Commit

Permalink
remove followedat socket
Browse files Browse the repository at this point in the history
  • Loading branch information
sogehige committed Aug 5, 2022
1 parent 3dbef67 commit 274545d
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 16 deletions.
2 changes: 0 additions & 2 deletions d.ts/src/helpers/socket.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ import type { OBSWebsocketInterface } from '@entity/obswebsocket';
import type { OverlayMapperMarathon, OverlayMappers } from '@entity/overlay';
import type { PermissionsInterface } from '@entity/permissions';
import type { PollInterface } from '@entity/poll';
import type { PriceInterface } from '@entity/price';
import type { QueueInterface } from '@entity/queue';
import type { QuotesInterface } from '@entity/quotes';
import type { RaffleInterface } from '@entity/raffle';
Expand Down Expand Up @@ -514,7 +513,6 @@ export type ClientToServerEventsWithNamespace = {
'viewers::update': (data: [userId: string, update: Partial<UserInterface> & { tips?: UserTipInterface[], bits?: UserBitInterface[] }], cb: (error: Error | string | null) => void) => void,
'viewers::remove': (userId: string, cb: (error: Error | string | null) => void) => void,
'getNameById': (id: string, cb: (error: Error | string | null, user: string | null) => void) => void,
'viewers::followedAt': (id: string, cb: (error: Error | string | null, followedAtDate: string | null) => void) => void,
'viewers::findOne': (id: string, cb: (error: Error | string | null, viewer: ViewerReturnType) => void) => void
'find.viewers': (opts: { exactUsernameFromTwitch?: boolean, state: string, page?: number; perPage?: number; order?: { orderBy: string, sortOrder: 'ASC' | 'DESC' }, filter?: { vips: boolean | null; subscribers: boolean | null; active: boolean | null; }, search?: string }, cb: (error: Error | string | null, viewers: any[], count: number, state: string | null) => void) => void,
'logout': (data: { accessToken: string | null, refreshToken: string | null }) => void
Expand Down
14 changes: 0 additions & 14 deletions src/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -463,20 +463,6 @@ class Users extends Core {
cb(e.stack, [], 0, null);
}
});
adminEndpoint('/core/users', 'viewers::followedAt', async (id, cb) => {
try {
const clientBot = await client('bot');
const broadcasterId = variables.get('services.twitch.broadcasterId') as string;
const getFollows = await clientBot.users.getFollows({ followedUser: broadcasterId, user: id });
if (getFollows.total === 0) {
throw new Error('Not a follower');
} else {
cb(null, new Date(getFollows.data[0].followDate).toISOString());
}
} catch (e: any) {
cb(e.stack, null);
}
});
viewerEndpoint('/core/users', 'viewers::findOne', async (userId, cb) => {
try {
const viewer = await changelog.get(userId);
Expand Down

0 comments on commit 274545d

Please sign in to comment.