import type { ChannelMessage as MezonChannelMessage } from 'mezon-sdk'; import type { MezonClient } from 'mezon-sdk'; import type { TokenSentEvent } from 'mezon-sdk'; import { Events as MezonEvents } from 'mezon-sdk'; import type { Message as MezonMessage } from 'mezon-sdk/dist/cjs/mezon-client/structures/Message'; import type { TextChannel as MezonTextChannel } from 'mezon-sdk/dist/cjs/mezon-client/structures/TextChannel'; import type { Clan as MezonClan } from 'mezon-sdk/dist/cjs/mezon-client/structures/Clan'; import type { User as MezonUser } from 'mezon-sdk/dist/cjs/mezon-client/structures/User'; import type { MessageButtonClicked, UserChannelRemoved, ChannelCreatedEvent, ChannelDeletedEvent, ChannelUpdatedEvent, RoleEvent, RoleAssignedEvent, AddClanUserEvent, StreamingJoinedEvent, StreamingLeavedEvent, DropdownBoxSelected, WebrtcSignalingFwd, VoiceStartedEvent, VoiceEndedEvent, VoiceJoinedEvent, VoiceLeavedEvent, Notifications, QuickMenuDataEvent } from 'mezon-sdk/dist/cjs/rtapi/realtime'; import type { MessageReaction, UserClanRemovedEvent, UserChannelAddedEvent, GiveCoffeeEvent } from 'mezon-sdk/dist/cjs/interfaces/socket'; import type { StreamingJoinedEvent as ClientStreamingJoinedEvent, StreamingLeavedEvent as ClientStreamingLeavedEvent } from 'mezon-sdk/dist/cjs/interfaces/client'; import * as Messaging from '../messaging/smart-message'; import type { ManagedMessage as ManagedMessageType, DMHelper as DMHelperType, ChannelHelper as ChannelHelperType, SmartMessageLike } from '../messaging/smart-message'; import * as ButtonModule from '../messaging/button-builder'; import type { ButtonComponent } from '../messaging/button-builder'; import * as EmbedModule from '../messaging/embed-builder'; import type { EmbedData } from '../messaging/embed-builder'; import type { NezonUtilsService as NezonUtilsServiceType } from '../services/nezon-utils.service'; /** * Convenience namespace that re-exports the most common mezon-sdk types and * Nezon-specific helpers. Consumers can import `Nezon` alongside the decorators * to keep type hints consistent: * * ```ts * import { Command, AutoContext } from '@n0xgg04/nezon'; * import type { Nezon } from '@n0xgg04/nezon'; * * @Command('ping') * async onPing(@AutoContext() [message]: Nezon.AutoContext) { * await message.reply(Nezon.SmartMessage.text('pong')); * } * ``` */ export declare namespace Nezon { type Client = MezonClient; type ChannelMessage = MezonChannelMessage; type Attachments = NonNullable; type Attachment = Attachments[number]; type Mentions = NonNullable; type Mention = Mentions[number]; type FormData = Record; type Message = MezonMessage; type Channel = MezonTextChannel; type Clan = MezonClan; type User = MezonUser; type ComponentPayload = MessageButtonClicked; type ComponentParams = string[] | Record; type ComponentParam = string | undefined; type Args = string[]; type AutoContext = [ ManagedMessageType, DMHelperType, ChannelHelperType ]; type SmartMessageInput = SmartMessageLike; const SmartMessage: typeof Messaging.SmartMessage; type ManagedMessage = ManagedMessageType; type DMHelper = DMHelperType; type ChannelHelper = ChannelHelperType; namespace AutoContextType { type Message = ManagedMessageType; type DM = DMHelperType; type Channel = ChannelHelperType; } type Button = ButtonComponent; const ButtonBuilder: typeof ButtonModule.ButtonBuilder; const ButtonStyle: typeof ButtonModule.ButtonStyle; type Embed = EmbedData; const EmbedBuilder: typeof EmbedModule.EmbedBuilder; type NezonUtilsService = NezonUtilsServiceType; type TokenSendPayload = TokenSentEvent; type AddClanUserPayload = AddClanUserEvent; type MessageReactionPayload = MessageReaction; type UserChannelRemovedPayload = UserChannelRemoved; type UserClanRemovedPayload = UserClanRemovedEvent; type UserChannelAddedPayload = UserChannelAddedEvent; type ChannelCreatedPayload = ChannelCreatedEvent; type ChannelDeletedPayload = ChannelDeletedEvent; type ChannelUpdatedPayload = ChannelUpdatedEvent; type RoleEventPayload = RoleEvent; type GiveCoffeePayload = GiveCoffeeEvent; type RoleAssignPayload = RoleAssignedEvent; type StreamingJoinedPayload = StreamingJoinedEvent | ClientStreamingJoinedEvent; type StreamingLeavedPayload = StreamingLeavedEvent | ClientStreamingLeavedEvent; type DropdownBoxSelectedPayload = DropdownBoxSelected; type WebrtcSignalingFwdPayload = WebrtcSignalingFwd; type VoiceStartedPayload = VoiceStartedEvent; type VoiceEndedPayload = VoiceEndedEvent; type VoiceJoinedPayload = VoiceJoinedEvent; type VoiceLeavedPayload = VoiceLeavedEvent; type NotificationsPayload = Notifications; type QuickMenuPayload = QuickMenuDataEvent; const Events: typeof MezonEvents; } export type { NezonUtilsService } from '../services/nezon-utils.service';