UserVoiceShow: Show in messages

This commit is contained in:
Nuckyz 2024-09-20 15:42:00 -03:00
parent 467157539c
commit 49b0a38c37
No known key found for this signature in database
GPG key ID: 440BF8296E1C4AD9
7 changed files with 53 additions and 34 deletions

View file

@ -16,7 +16,7 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
import { Guild, GuildMember, User } from "discord-types/general";
import { Channel, Guild, GuildMember, User } from "discord-types/general";
import type { ReactNode } from "react";
import { LiteralUnion } from "type-fest";
@ -173,6 +173,11 @@ export interface NavigationRouter {
transitionToGuild(guildId: string, ...args: unknown[]): void;
}
export interface ChannelRouter {
transitionToChannel: (channelId: string) => void;
transitionToThread: (channel: Channel) => void;
}
export interface IconUtils {
getUserAvatarURL(user: User, canAnimate?: boolean, size?: number, format?: string): string;
getDefaultAvatarURL(id: string, discriminator?: string): string;

View file

@ -149,6 +149,10 @@ export const NavigationRouter: t.NavigationRouter = mapMangledModuleLazy("Transi
back: filters.byCode("goBack()"),
forward: filters.byCode("goForward()"),
});
export const ChannelRouter: t.ChannelRouter = mapMangledModuleLazy('"Thread must have a parent ID."', {
transitionToChannel: filters.byCode(".preload"),
transitionToThread: filters.byCode('"Thread must have a parent ID."')
});
export let SettingsRouter: any;
waitFor(["open", "saveAccountChanges"], m => SettingsRouter = m);