Skip to content

Commit

Permalink
fixed slash command api (#604)
Browse files Browse the repository at this point in the history
* fixed bruh

* type and prettier fix

* cspell showed issue

* remove commands from context menu

* okay typed

* cspell

* requested changes

* should be it?

---------

Co-authored-by: Federico Di Leo <38290480+FedeIlLeone@users.noreply.github.com>
  • Loading branch information
yofukashino and FedeIlLeone authored Apr 7, 2024
1 parent b3afe28 commit e81b190
Show file tree
Hide file tree
Showing 6 changed files with 207 additions and 191 deletions.
2 changes: 2 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
"coremods",
"crosspost",
"customitem",
"dataurl",
"dependants",
"devmode",
"discordapp",
Expand All @@ -29,6 +30,7 @@
"flatpaks",
"fontawesome",
"Fonticons",
"Frecency",
"getent",
"gifv",
"globstar",
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

0 comments on commit e81b190

Please sign in to comment.