Skip to content

Commit

Permalink
Don't try to replace Unicode emoji
Browse files Browse the repository at this point in the history
  • Loading branch information
cafeed28 committed Feb 9, 2023
1 parent 13629c3 commit bbc7eb3
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"discordID": "942752356595023874",
"github": "cafeed28"
},
"version": "2.0.3",
"version": "2.0.4",
"updater": {
"type": "github",
"id": "cafeed28/replugged-nitrospoof"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "replugged-nitrospoof",
"version": "2.0.3",
"version": "2.0.4",
"description": "Use some Nitro features without wasting your money!",
"engines": {
"node": ">=14.0.0"
Expand Down
3 changes: 3 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ const injector = new Injector();
let userPremiumType: PremiumType;

function isEmojiAvailable(emoji: Emoji): boolean {
// Unicode emoji
if (emoji.emojiObject) return true;

// Emoji not available on Discord (e.g. GUILD_SUBSCRIPTION_UNAVAILABLE)
if (!emoji.available) return false;

Expand Down
6 changes: 6 additions & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,12 @@ export interface Emoji {
url: string;
id: string;
guildId: string;

emojiObject?: {
names: string[];
surrogates: string;
uniqueName: string;
};
}

export interface OutgoingMessage {
Expand Down

0 comments on commit bbc7eb3

Please sign in to comment.