mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-07 19:22:14 +09:00
feat(discovery): resolve message links into discoverable guilds (#3159)
This commit is contained in:
@@ -50,6 +50,10 @@ export const GuildIdUserIdParam = GuildIdParam.extend(UserIdParam.shape);
|
||||
|
||||
export type GuildIdUserIdParam = z.infer<typeof GuildIdUserIdParam>;
|
||||
|
||||
export const GuildIdChannelIdParam = GuildIdParam.extend(ChannelIdParam.shape);
|
||||
|
||||
export type GuildIdChannelIdParam = z.infer<typeof GuildIdChannelIdParam>;
|
||||
|
||||
export const GuildIdRoleIdParam = GuildIdParam.extend({
|
||||
role_id: SnowflakeType.describe('The ID of the role'),
|
||||
});
|
||||
|
||||
@@ -100,6 +100,25 @@ export const DiscoveryGuildListResponse = z.object({
|
||||
|
||||
export type DiscoveryGuildListResponse = z.infer<typeof DiscoveryGuildListResponse>;
|
||||
|
||||
export const DiscoveryChannelPreviewResponse = z.object({
|
||||
guild: z
|
||||
.object({
|
||||
id: SnowflakeStringType.describe('Guild ID'),
|
||||
name: z.string().describe('Guild name'),
|
||||
icon: z.string().nullable().describe('Guild icon hash'),
|
||||
})
|
||||
.describe('The discoverable guild the channel belongs to'),
|
||||
channel: z
|
||||
.object({
|
||||
id: SnowflakeStringType.describe('Channel ID'),
|
||||
name: z.string().nullable().describe('Channel name'),
|
||||
type: z.number().describe('Channel type'),
|
||||
})
|
||||
.describe('A channel that new members can view'),
|
||||
});
|
||||
|
||||
export type DiscoveryChannelPreviewResponse = z.infer<typeof DiscoveryChannelPreviewResponse>;
|
||||
|
||||
export const DiscoveryApplicationResponse = z.object({
|
||||
guild_id: SnowflakeStringType.describe('Guild ID'),
|
||||
guild_nsfw_level: NSFWLevelSchema.nullable().optional().describe('NSFW level of the guild'),
|
||||
|
||||
Reference in New Issue
Block a user