Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixed slash command api #604

Merged
merged 12 commits into from
Apr 7, 2024
1 change: 1 addition & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"coremods",
"crosspost",
"customitem",
"dataurl",
"dependants",
"devmode",
"discordapp",
Expand Down
3 changes: 3 additions & 0 deletions scripts/build.mts
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ const contexts = await Promise.all([
target: `chrome${CHROME_VERSION}`,
outfile: `${distDir}/renderer.js`,
format: "esm",
loader: {
".png": "dataurl",
},
}),
]);
await Promise.all(
Expand Down
4 changes: 2 additions & 2 deletions src/renderer/apis/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { constants, i18n, messages, users } from "../modules/common";
import type { Store } from "../modules/common/flux";
import { Logger } from "../modules/logger";
import { filters, getByStoreName, waitForModule } from "../modules/webpack";

import icon from "../assets/logo.png";
const logger = Logger.api("Commands");

let RepluggedUser: User | undefined;
Expand All @@ -42,7 +42,7 @@ export const defaultSection: RepluggedCommandSection = Object.freeze({
id: "replugged",
name: "Replugged",
type: 1,
icon: "https://cdn.discordapp.com/attachments/1000955992068079716/1004196106055454820/Replugged-Logo.png",
icon,
});

export class CommandInteraction<T extends CommandOptionReturn> {
Expand Down
3 changes: 3 additions & 0 deletions src/renderer/assets/assets.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
declare module "*.png" {
export default content as string;
}
Binary file added src/renderer/assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading