diff --git a/src/plugins/typingTweaks.tsx b/src/plugins/typingTweaks.tsx index 3eb4fadec..0d72ca001 100644 --- a/src/plugins/typingTweaks.tsx +++ b/src/plugins/typingTweaks.tsx @@ -21,10 +21,11 @@ import ErrorBoundary from "@components/ErrorBoundary"; import { Devs } from "@utils/constants"; import definePlugin, { OptionType } from "@utils/types"; import { findByCodeLazy } from "@webpack"; -import { GuildMemberStore, React, RelationshipStore } from "@webpack/common"; +import { GuildMemberStore, React, RelationshipStore, SelectedChannelStore } from "@webpack/common"; import { User } from "discord-types/general"; const Avatar = findByCodeLazy('"top",spacing:'); +const openProfile = findByCodeLazy("friendToken", "USER_PROFILE_MODAL_OPEN"); const settings = definePluginSettings({ showAvatars: { @@ -53,6 +54,46 @@ export function buildSeveralUsers({ a, b, c }: { a: string, b: string, c: number ]; } +interface Props { + user: User; + guildId: string; +} + +const TypingUser = ErrorBoundary.wrap(function ({ user, guildId }: Props) { + return ( + { + openProfile({ + userId: user.id, + guildId, + channelId: SelectedChannelStore.getChannelId(), + analyticsLocation: { + page: guildId ? "Guild Channel" : "DM Channel", + section: "Profile Popout" + } + }); + }} + style={{ + display: "grid", + gridAutoFlow: "column", + gap: "4px", + color: settings.store.showRoleColors ? GuildMemberStore.getMember(guildId, user.id)?.colorString : undefined, + cursor: "pointer" + }} + > + {settings.store.showAvatars && ( +
+ +
+ )} + {GuildMemberStore.getNick(guildId!, user.id) || !guildId && RelationshipStore.getNickname(user.id) || user.username} +
+ ); +}, { noop: true }); + export default definePlugin({ name: "TypingTweaks", description: "Show avatars and role colours in the typing indicator", @@ -93,22 +134,10 @@ export default definePlugin({ let element = 0; - return children.map(c => c.type === "strong" ? : c); + return children.map(c => + c.type === "strong" + ? + : c + ); }, - - TypingUser: ErrorBoundary.wrap(({ user, guildId }: { user: User, guildId: string; }) => { - return - {settings.store.showAvatars &&
- -
} - {GuildMemberStore.getNick(guildId!, user.id) || !guildId && RelationshipStore.getNickname(user.id) || user.username} -
; - }, { noop: true }) }); diff --git a/src/plugins/uwuify.ts b/src/plugins/uwuify.ts index e4b10e84d..c3a879c79 100644 --- a/src/plugins/uwuify.ts +++ b/src/plugins/uwuify.ts @@ -94,7 +94,7 @@ function uwuify(message: string): string { export default definePlugin({ name: "UwUifier", description: "Simply uwuify commands", - authors: [Devs.echo], + authors: [Devs.echo, Devs.skyevg], dependencies: ["CommandsAPI"], commands: [ diff --git a/src/utils/constants.ts b/src/utils/constants.ts index e7ac09aa7..c6277f557 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -221,5 +221,9 @@ export const Devs = /* #__PURE__*/ Object.freeze({ TheKodeToad: { name: "TheKodeToad", id: 706152404072267788n + }, + skyevg: { + name: "skyevg", + id: 1090310844283363348n } });