Changed small functions to methods

Added custom color function
This commit is contained in:
2024-09-07 20:09:29 +02:00
parent a9fb41cece
commit 7a2a136f30
33 changed files with 74 additions and 76 deletions

View File

@@ -1,7 +1,7 @@
import { Redis } from "ioredis"
import { ExtendedClient as Client } from "utils/Client.js"
import env from "utils/Env.js"
import color from "utils/functions/colors.js"
import { color } from "utils/functions/colors.js"
// import { connect } from "mongoose"
import { Player } from "discord-player"
import { YoutubeiExtractor } from "discord-player-youtubei"
@@ -38,6 +38,7 @@ class Illegitimate {
await player.extractors.register(YoutubeiExtractor, {})
await client.start()
await this.databases()
this.loadMethods()
}
private async databases() {
@@ -71,6 +72,16 @@ class Illegitimate {
}
}
}
private loadMethods() {
String.prototype.removeIndents = function(this: string) {
return this.replace(/^ */gm, "")
}
String.prototype.capitalizeFirstLetter = function(this: string) {
return this[0].toUpperCase() + this.slice(1).toLowerCase()
}
}
}
export { client, Illegitimate, redis, sequelize }