Skip to content

Commit

Permalink
move: src/handler/Player -> src/setup
Browse files Browse the repository at this point in the history
  • Loading branch information
RainyXeon committed Sep 7, 2024
1 parent 850ea31 commit 2127711
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 26 deletions.
4 changes: 3 additions & 1 deletion src/handlers/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import { Manager } from '../manager.js'
import { Checker } from './loadCheck.js'
import { CommandAndButtonLoader } from './loadCommand.js'
import { ClientEventsLoader } from './loadEvents.js'
import { PlayerLoader } from './loadPlayer.js'
import { PlayerEventLoader } from './loadPlayerEvents.js'
import { PlayerLoader } from './loadSetup.js'

export class initHandler {
constructor(client: Manager) {
if (client.config.utilities.AUTOFIX_LAVALINK.enable) new Checker(client)
new PlayerEventLoader(client)
new ClientEventsLoader(client)
new PlayerLoader(client)
new CommandAndButtonLoader(client)
Expand Down
12 changes: 0 additions & 12 deletions src/handlers/loadPlayer.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import readdirRecursive from 'recursive-readdir'
import { resolve } from 'path'
import { join, dirname } from 'path'
import { fileURLToPath, pathToFileURL } from 'url'
import { Manager } from '../../manager.js'
import { Manager } from '../manager.js'
import { RainlinkEventsInterface } from 'rainlink'
const __dirname = dirname(fileURLToPath(import.meta.url))

Expand Down
10 changes: 10 additions & 0 deletions src/handlers/loadSetup.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import { Manager } from '../manager.js'
import { ChannelHandler } from '../setup/ChannelHandler.js'
import { ChannelUpdater } from '../setup/ChannelUpdater.js'

export class PlayerLoader {
constructor(client: Manager) {
new ChannelHandler(client)
new ChannelUpdater(client)
}
}
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
import { Manager } from '../../manager.js'
import { Manager } from '../manager.js'
import {
EmbedBuilder,
Message,
GuildMember,
TextChannel,
StringSelectMenuInteraction,
} from 'discord.js'
import { GlobalInteraction } from '../../@types/Interaction.js'
import { GlobalInteraction } from '../@types/Interaction.js'
import { RateLimitManager } from '@sapphire/ratelimits'
import { convertTime } from '../../utilities/ConvertTime.js'
import { getTitle } from '../../utilities/GetTitle.js'
import { BlacklistService } from '../../services/BlacklistService.js'
import { convertTime } from '../utilities/ConvertTime.js'
import { getTitle } from '../utilities/GetTitle.js'
import { BlacklistService } from '../services/BlacklistService.js'
import { RainlinkFilterMode } from 'rainlink'
const rateLimitManager = new RateLimitManager(2000)

/**
* @param {Client} client
*/

export class PlayerContentLoader {
export class ChannelHandler {
client: Manager
constructor(client: Manager) {
this.client = client
Expand All @@ -30,7 +30,7 @@ export class PlayerContentLoader {
this.client.on('interactionCreate', (interaction) => this.interaction(interaction))
this.client.on('messageCreate', (message) => this.message(message))
} catch (err) {
this.client.logger.error(PlayerContentLoader.name, err)
this.client.logger.error(ChannelHandler.name, err)
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { Manager } from '../../manager.js'
import { Manager } from '../manager.js'
import { EmbedBuilder, TextChannel } from 'discord.js'
import { formatDuration } from '../../utilities/FormatDuration.js'
import { formatDuration } from '../utilities/FormatDuration.js'
import { RainlinkPlayer } from 'rainlink'
import { getTitle } from '../../utilities/GetTitle.js'
import { filterSelect, playerRowOne, playerRowTwo } from '../../utilities/PlayerControlButton.js'
import { getTitle } from '../utilities/GetTitle.js'
import { filterSelect, playerRowOne, playerRowTwo } from '../utilities/PlayerControlButton.js'

export class PlayerUpdateLoader {
export class ChannelUpdater {
client: Manager
constructor(client: Manager) {
this.client = client
Expand Down

0 comments on commit 2127711

Please sign in to comment.