Skip to content

testCommand: Replace SerenityOS emoji with more standard emoji #20

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

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 11 additions & 24 deletions src/commands/testCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,7 @@

import { EmbedBuilder, ChatInputCommandInteraction, SlashCommandBuilder, Client } from "discord.js";
import axios from "axios";
import {
getBuggiemagnify,
getBuggus,
getLibjs,
getMakemore,
getNeoyak,
getPoggie,
getSadCaret,
getSkeleyak,
getYak,
getYakslice,
getYaksplode,
getYakstack,
} from "@/util/emoji";
import { getLadybird, getMakemore, getSadCaret } from "@/util/emoji";
import Command from "./command";
import githubAPI from "@/apis/githubAPI";

Expand Down Expand Up @@ -155,25 +142,25 @@ export class TestCommand extends Command {
case "total":
return "🧪";
case "passed":
return (await getPoggie(client))?.toString() ?? label;
return "✅";
case "failed":
return (await getYak(client))?.toString() ?? label;
return "❌";
case "skipped":
return (await getBuggiemagnify(client))?.toString() ?? label;
return "⚠️";
case "metadata_error":
return (await getBuggus(client))?.toString() ?? label;
return "📄";
case "harness_error":
return (await getYakslice(client))?.toString() ?? label;
return "⚙️";
case "timeout_error":
return (await getSkeleyak(client))?.toString() ?? label;
return "💀";
case "process_error":
return (await getYaksplode(client))?.toString() ?? label;
return "💥️";
case "runner_exception":
return (await getNeoyak(client))?.toString() ?? label;
return "🐍";
case "todo_error":
return (await getYakstack(client))?.toString() ?? label;
return "📝";
case "percentage_passing":
return (await getLibjs(client))?.toString() ?? label;
return (await getLadybird(client))?.toString() ?? label;
default:
return label;
}
Expand Down
7 changes: 6 additions & 1 deletion src/util/emoji.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2021, the SerenityOS & Ladybird developers.
* Copyright (c) 2021-2024, the SerenityOS & Ladybird developers.
* Copyright (c) 2024, versecafe
*
* SPDX-License-Identifier: BSD-2-Clause
Expand Down Expand Up @@ -85,6 +85,11 @@ export async function getNeoyak(clientOrParent: ClientOrParent): Promise<Emoji |
return await getEmoji(clientOrParent, "neoyak");
}

/** Alias function for the :ladybird: emoji */
export async function getLadybird(clientOrParent: ClientOrParent): Promise<Emoji | null> {
return await getEmoji(clientOrParent, "ladybird");
}

/** Alias function for the :libjs: emoji */
export async function getLibjs(clientOrParent: ClientOrParent): Promise<Emoji | null> {
return await getEmoji(clientOrParent, "libjs");
Expand Down