mirror of
https://github.com/ahmadk953/poixpixel-discord-bot.git
synced 2025-07-05 03:46:00 +00:00
chore: merge branch main into achievement-fixes
Some checks failed
Commitlint / Run commitlint scanning (push) Has been cancelled
Some checks failed
Commitlint / Run commitlint scanning (push) Has been cancelled
This commit is contained in:
commit
1eb068a634
16 changed files with 714 additions and 135 deletions
|
@ -103,9 +103,7 @@ export async function initializeDatabaseConnection(): Promise<boolean> {
|
|||
ssl: (() => {
|
||||
try {
|
||||
return {
|
||||
ca: fs.readFileSync(path.resolve('./certs/psql-ca.crt')),
|
||||
key: fs.readFileSync(path.resolve('./certs/psql-client.key')),
|
||||
cert: fs.readFileSync(path.resolve('./certs/psql-server.crt')),
|
||||
ca: fs.readFileSync(path.resolve('./certs/rootCA.pem')),
|
||||
};
|
||||
} catch (error) {
|
||||
console.warn(
|
||||
|
|
|
@ -96,9 +96,9 @@ async function initializeRedisConnection() {
|
|||
tls: (() => {
|
||||
try {
|
||||
return {
|
||||
ca: fs.readFileSync(path.resolve('./certs/cache-ca.crt')),
|
||||
key: fs.readFileSync(path.resolve('./certs/cache-client.key')),
|
||||
cert: fs.readFileSync(path.resolve('./certs/cache-server.crt')),
|
||||
ca: fs.readFileSync(path.resolve('./certs/rootCA.pem')),
|
||||
key: fs.readFileSync(path.resolve('./certs/cache-key.pem')),
|
||||
cert: fs.readFileSync(path.resolve('./certs/cache-cert.pem')),
|
||||
};
|
||||
} catch (error) {
|
||||
console.warn(
|
||||
|
|
|
@ -19,7 +19,7 @@ import { moderationTable } from '@/db/schema.js';
|
|||
import { db, getMember, handleDbError, updateMember } from '@/db/db.js';
|
||||
import logAction from './logging/logAction.js';
|
||||
|
||||
const __dirname = path.resolve();
|
||||
const PROJECT_ROOT = path.resolve();
|
||||
|
||||
/**
|
||||
* Turns a duration string into milliseconds
|
||||
|
@ -67,7 +67,12 @@ export async function generateMemberBanner({
|
|||
width,
|
||||
height,
|
||||
}: generateMemberBannerTypes): Promise<AttachmentBuilder> {
|
||||
const welcomeBackground = path.join(__dirname, 'assets', 'images', 'welcome-bg.png');
|
||||
const welcomeBackground = path.join(
|
||||
PROJECT_ROOT,
|
||||
'assets',
|
||||
'images',
|
||||
'welcome-bg.png',
|
||||
);
|
||||
const canvas = Canvas.createCanvas(width, height);
|
||||
const context = canvas.getContext('2d');
|
||||
const background = await Canvas.loadImage(welcomeBackground);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue