Skip to content

Commit

Permalink
v2.4.1 - Fix starboard not working with custom emojis and improve doc…
Browse files Browse the repository at this point in the history
…ker support
  • Loading branch information
Reishimanfr committed Jun 2, 2024
1 parent 22d8694 commit 22956c2
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 7 deletions.
1 change: 0 additions & 1 deletion src/Classes/Bot.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import type { Event } from '../Types/Event'
import type { Command } from '../Types/Command'
import { setTimeout } from 'node:timers/promises'
import type { Button } from '../Types/Button'
require('dotenv').config()

const COMMANDS_PATH = join(__dirname, '../Commands')
const CLIENT_EVENTS_PATH = join(__dirname, '../Events/Bot')
Expand Down
2 changes: 1 addition & 1 deletion src/Commands/config/starboard-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ const starboard_config: Command<false> = {
newEmojisInput
.split(', ')
.map(emoji => emoji.trim())
.filter(emoji => emoji.match(/<a?:.+?:\d{18}>|\p{Extended_Pictographic}/gu)))
.filter(emoji => emoji.match(/(<a?)?:\w+:(\d{18}>)?|\p{Extended_Pictographic}/gu)))
]

data.emojis = newEmojis.join(' ')
Expand Down
1 change: 0 additions & 1 deletion src/Events/Bot/Ready.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import pjson from '../../../package.json'
import axios from 'axios'
import semver from 'semver'
import type { Bot } from '../../Classes/Bot'
require('dotenv').config()

async function checkIfNewVersionAvailable() {
const REPOSITORY_URL = 'https://api.github.com/repos/Reishimanfr/The-World-Machine-Bot/tags'
Expand Down
3 changes: 1 addition & 2 deletions src/Helpers/Logger.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
import chalk from "chalk"
import moment from 'moment'
require('dotenv').config()

const logLevel = process.env.LOG_LEVEL
const logLevel = process.env.LOG_LEVEL ?? 'info'

// 0 1 2 3 4 5
const levelNames = ['trace', 'debug', 'info', 'warn', 'error', 'fatal']
Expand Down
5 changes: 4 additions & 1 deletion src/Models/Connection.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import { Sequelize } from 'sequelize'
import { logger } from '../Helpers/Logger'
import path from 'node:path'
require('dotenv').config()

if (!process.env.DOCKER) {
require('dotenv').config()
}

const sequelize = new Sequelize({
dialect: process.env.DATABASE_DIALECT,
Expand Down
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ import cron from 'node-cron'
import { clipString } from './Funcs/ClipString'
import { logger } from './Helpers/Logger'
import process from "node:process"
require('dotenv').config()

if (!process.env.DOCKER) {
require('dotenv').config()
}

export const client = new Bot({
failIfNotExists: true,
Expand Down

0 comments on commit 22956c2

Please sign in to comment.