aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/commands/dev/eval.ts22
-rw-r--r--src/lib/extensions/discord-akairo/BushClient.ts3
-rw-r--r--src/lib/utils/BushConstants.ts4
3 files changed, 22 insertions, 7 deletions
diff --git a/src/commands/dev/eval.ts b/src/commands/dev/eval.ts
index 617672f..3c9b54c 100644
--- a/src/commands/dev/eval.ts
+++ b/src/commands/dev/eval.ts
@@ -37,13 +37,16 @@ import {
SelectMenuComponent,
Util
} from 'discord.js';
+import path from 'path';
import ts from 'typescript';
+import { fileURLToPath } from 'url';
import { promisify } from 'util';
const { transpile } = ts,
emojis = util.emojis,
colors = util.colors,
sh = promisify(exec),
- SnowflakeUtil = new Snowflake_(1420070400000n);
+ SnowflakeUtil = new Snowflake_(1420070400000n),
+ __dirname = path.dirname(fileURLToPath(import.meta.url));
/* eslint-enable @typescript-eslint/no-unused-vars */
export default class EvalCommand extends BushCommand {
@@ -191,7 +194,22 @@ export default class EvalCommand extends BushCommand {
const code: { ts: string | null; js: string; lang: 'ts' | 'js' } = {
ts: isTypescript ? rawCode : null,
- js: isTypescript ? transpile(rawCode) : rawCode,
+ js: isTypescript
+ ? transpile(rawCode, {
+ module: ts.ModuleKind.ESNext,
+ target: ts.ScriptTarget.ESNext,
+ moduleResolution: ts.ModuleResolutionKind.NodeNext,
+ lib: ['esnext'],
+ sourceMap: true,
+ incremental: true,
+ experimentalDecorators: true,
+ emitDecoratorMetadata: true,
+ resolveJsonModule: true,
+ noImplicitOverride: true,
+ noErrorTruncation: true,
+ strict: true
+ })
+ : rawCode,
lang: isTypescript ? 'ts' : 'js'
};
diff --git a/src/lib/extensions/discord-akairo/BushClient.ts b/src/lib/extensions/discord-akairo/BushClient.ts
index ce72ee2..7acd3df 100644
--- a/src/lib/extensions/discord-akairo/BushClient.ts
+++ b/src/lib/extensions/discord-akairo/BushClient.ts
@@ -439,8 +439,6 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re
*/
public async start() {
this.intercept('ready', async (arg, done) => {
- console.debug('ready start');
- console.time('ready');
const promises = this.guilds.cache
.filter((g) => g.large)
.map((guild) => {
@@ -449,7 +447,6 @@ export class BushClient<Ready extends boolean = boolean> extends AkairoClient<Re
await Promise.all(promises);
this.customReady = true;
this.taskHandler.startAll();
- console.timeEnd('ready');
return done(null, `intercepted ${arg}`);
});
diff --git a/src/lib/utils/BushConstants.ts b/src/lib/utils/BushConstants.ts
index df8212b..39f3299 100644
--- a/src/lib/utils/BushConstants.ts
+++ b/src/lib/utils/BushConstants.ts
@@ -321,8 +321,8 @@ export class BushConstants {
capes: [
/* supporter capes */
- { name: 'patreon1', purchasable: true },
- { name: 'patreon2', purchasable: true },
+ { name: 'patreon1', purchasable: false /* moulberry no longer offers */ },
+ { name: 'patreon2', purchasable: false /* moulberry no longer offers */ },
{ name: 'fade', custom: `${rawCapeUrl}fade.gif`, purchasable: true },
{ name: 'lava', custom: `${rawCapeUrl}lava.gif`, purchasable: true },
{ name: 'mcworld', custom: `${rawCapeUrl}mcworld_compressed.gif`, purchasable: true },