Skip to content
This repository has been archived by the owner on Oct 17, 2024. It is now read-only.

Commit

Permalink
canvasを使用する機能をImages Featureに移動
Browse files Browse the repository at this point in the history
  • Loading branch information
takejohn committed May 2, 2024
1 parent e8d7be5 commit 31901a6
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 7 deletions.
1 change: 1 addition & 0 deletions core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ export { default as Config } from './internal/config';
export * as Logger from './internal/logger';
export * as Schedules from './internal/schedules';

export * from './util/calendar';
export * from './util/languages';
export { default as Pager } from './util/pager';
export * as Result from './util/result';
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import { createCanvas } from 'canvas';
import { SimpleSlashCommandBuilder, LANG, strFormat } from 'core';
import { DayOfWeek, MonthCalendar } from '../util/calendar';
import {
SimpleSlashCommandBuilder,
LANG,
strFormat,
DayOfWeek,
MonthCalendar,
} from 'core';
import {
BoundingBox,
CanvasTable,
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 11 additions & 1 deletion packages/images/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
import { Feature } from 'core';
import { CommandManager, Feature } from 'core';
import { registerConfiguredFont } from './util/canvasUtils';
import { Client } from 'discord.js';
import path from 'path';

class ImagesFeature extends Feature {
enabled: boolean = true;

name: string = 'images';

async onLoad(client: Client<boolean>): Promise<void> {
registerConfiguredFont();
await CommandManager.default.loadDirectory(
path.join(__dirname, 'commands'),
);
}
}

export const feature = new ImagesFeature();
File renamed without changes.
3 changes: 1 addition & 2 deletions packages/misc/commands/date.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { CompoundCommandBuilder, LANG, strFormat } from 'core';
import { CalendarDate } from '../util/calendar';
import { CompoundCommandBuilder, LANG, strFormat, CalendarDate } from 'core';

const builder = new CompoundCommandBuilder(
LANG.commands.date.name,
Expand Down
2 changes: 0 additions & 2 deletions packages/misc/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { ClientMessageHandler } from './util/messages';
import path from 'path';

import { Feature, CommandManager, Config } from 'core';
import { registerConfiguredFont } from './util/canvasUtils';
import { Client } from 'discord.js';

class MiscFeature extends Feature {
Expand All @@ -17,7 +16,6 @@ class MiscFeature extends Feature {
client.on('messageCreate', (message) =>
this.messageHandler?.handleMessage(message),
);
registerConfiguredFont();
await CommandManager.default.loadDirectory(
path.join(__dirname, 'commands'),
);
Expand Down

0 comments on commit 31901a6

Please sign in to comment.