Skip to content

Commit

Permalink
feature: Remove events dependency on gateway
Browse files Browse the repository at this point in the history
  • Loading branch information
l7ssha committed Oct 26, 2024
1 parent 9381548 commit f5ab177
Show file tree
Hide file tree
Showing 29 changed files with 1,316 additions and 1,328 deletions.
41 changes: 16 additions & 25 deletions lib/nyxx.dart
Original file line number Diff line number Diff line change
Expand Up @@ -243,22 +243,13 @@ export 'src/models/voice/voice_state.dart' show VoiceState;
export 'src/models/voice/voice_region.dart' show VoiceRegion;
export 'src/models/role.dart' show PartialRole, Role, RoleTags, RoleFlags;
export 'src/models/gateway/gateway.dart' show GatewayBot, GatewayConfiguration, SessionStartLimit;
export 'src/models/gateway/event.dart'
show
DispatchEvent,
GatewayEvent,
HeartbeatAckEvent,
HeartbeatEvent,
HelloEvent,
InvalidSessionEvent,
RawDispatchEvent,
ReconnectEvent,
UnknownDispatchEvent;
export 'src/models/events/event.dart'
show DispatchEvent, Event, HeartbeatAckEvent, HeartbeatEvent, HelloEvent, InvalidSessionEvent, RawDispatchEvent, ReconnectEvent, UnknownDispatchEvent;
export 'src/models/gateway/opcode.dart' show Opcode;
export 'src/models/gateway/events/application_command.dart' show ApplicationCommandPermissionsUpdateEvent;
export 'src/models/gateway/events/auto_moderation.dart'
export 'src/models/events/application_command.dart' show ApplicationCommandPermissionsUpdateEvent;
export 'src/models/events/auto_moderation.dart'
show AutoModerationActionExecutionEvent, AutoModerationRuleCreateEvent, AutoModerationRuleDeleteEvent, AutoModerationRuleUpdateEvent;
export 'src/models/gateway/events/channel.dart'
export 'src/models/events/channel.dart'
show
ChannelCreateEvent,
ChannelDeleteEvent,
Expand All @@ -270,7 +261,7 @@ export 'src/models/gateway/events/channel.dart'
ThreadMemberUpdateEvent,
ThreadMembersUpdateEvent,
ThreadUpdateEvent;
export 'src/models/gateway/events/guild.dart'
export 'src/models/events/guild.dart'
show
GuildBanAddEvent,
GuildBanRemoveEvent,
Expand All @@ -294,10 +285,10 @@ export 'src/models/gateway/events/guild.dart'
GuildStickersUpdateEvent,
GuildUpdateEvent,
UnavailableGuildCreateEvent;
export 'src/models/gateway/events/integration.dart' show IntegrationCreateEvent, IntegrationDeleteEvent, IntegrationUpdateEvent;
export 'src/models/gateway/events/interaction.dart' show InteractionCreateEvent;
export 'src/models/gateway/events/invite.dart' show InviteCreateEvent, InviteDeleteEvent;
export 'src/models/gateway/events/message.dart'
export 'src/models/events/integration.dart' show IntegrationCreateEvent, IntegrationDeleteEvent, IntegrationUpdateEvent;
export 'src/models/events/interaction.dart' show InteractionCreateEvent;
export 'src/models/events/invite.dart' show InviteCreateEvent, InviteDeleteEvent;
export 'src/models/events/message.dart'
show
MessageBulkDeleteEvent,
MessageCreateEvent,
Expand All @@ -309,12 +300,12 @@ export 'src/models/gateway/events/message.dart'
MessageUpdateEvent,
MessagePollVoteAddEvent,
MessagePollVoteRemoveEvent;
export 'src/models/gateway/events/presence.dart' show PresenceUpdateEvent, TypingStartEvent, UserUpdateEvent;
export 'src/models/gateway/events/ready.dart' show ReadyEvent, ResumedEvent;
export 'src/models/gateway/events/stage_instance.dart' show StageInstanceCreateEvent, StageInstanceDeleteEvent, StageInstanceUpdateEvent;
export 'src/models/gateway/events/voice.dart' show VoiceServerUpdateEvent, VoiceStateUpdateEvent;
export 'src/models/gateway/events/webhook.dart' show WebhooksUpdateEvent;
export 'src/models/gateway/events/entitlement.dart' show EntitlementCreateEvent, EntitlementDeleteEvent, EntitlementUpdateEvent;
export 'src/models/events/presence.dart' show PresenceUpdateEvent, TypingStartEvent, UserUpdateEvent;
export 'src/models/events/ready.dart' show ReadyEvent, ResumedEvent;
export 'src/models/events/stage_instance.dart' show StageInstanceCreateEvent, StageInstanceDeleteEvent, StageInstanceUpdateEvent;
export 'src/models/events/voice.dart' show VoiceServerUpdateEvent, VoiceStateUpdateEvent;
export 'src/models/events/webhook.dart' show WebhooksUpdateEvent;
export 'src/models/events/entitlement.dart' show EntitlementCreateEvent, EntitlementDeleteEvent, EntitlementUpdateEvent;
export 'src/models/presence.dart'
show Activity, ActivityAssets, ActivityButton, ActivityFlags, ActivityParty, ActivitySecrets, ActivityTimestamps, ClientStatus, ActivityType, UserStatus;
export 'src/models/emoji.dart' show Emoji, GuildEmoji, PartialEmoji, TextEmoji;
Expand Down
2 changes: 1 addition & 1 deletion lib/src/builders/presence.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import 'package:nyxx/src/builders/builder.dart';
import 'package:nyxx/src/models/gateway/events/presence.dart';
import 'package:nyxx/src/models/events/presence.dart';
import 'package:nyxx/src/models/presence.dart';

class PresenceBuilder extends CreateBuilder<PresenceUpdateEvent> {
Expand Down
32 changes: 16 additions & 16 deletions lib/src/event_mixin.dart
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import 'dart:async';

import 'package:nyxx/src/client.dart';
import 'package:nyxx/src/models/gateway/event.dart';
import 'package:nyxx/src/models/gateway/events/application_command.dart';
import 'package:nyxx/src/models/gateway/events/auto_moderation.dart';
import 'package:nyxx/src/models/gateway/events/channel.dart';
import 'package:nyxx/src/models/gateway/events/entitlement.dart';
import 'package:nyxx/src/models/gateway/events/guild.dart';
import 'package:nyxx/src/models/gateway/events/integration.dart';
import 'package:nyxx/src/models/gateway/events/interaction.dart';
import 'package:nyxx/src/models/gateway/events/invite.dart';
import 'package:nyxx/src/models/gateway/events/message.dart';
import 'package:nyxx/src/models/gateway/events/presence.dart';
import 'package:nyxx/src/models/gateway/events/ready.dart';
import 'package:nyxx/src/models/gateway/events/soundboard.dart';
import 'package:nyxx/src/models/gateway/events/stage_instance.dart';
import 'package:nyxx/src/models/gateway/events/voice.dart';
import 'package:nyxx/src/models/gateway/events/webhook.dart';
import 'package:nyxx/src/models/events/event.dart';
import 'package:nyxx/src/models/events/application_command.dart';
import 'package:nyxx/src/models/events/auto_moderation.dart';
import 'package:nyxx/src/models/events/channel.dart';
import 'package:nyxx/src/models/events/entitlement.dart';
import 'package:nyxx/src/models/events/guild.dart';
import 'package:nyxx/src/models/events/integration.dart';
import 'package:nyxx/src/models/events/interaction.dart';
import 'package:nyxx/src/models/events/invite.dart';
import 'package:nyxx/src/models/events/message.dart';
import 'package:nyxx/src/models/events/presence.dart';
import 'package:nyxx/src/models/events/ready.dart';
import 'package:nyxx/src/models/events/soundboard.dart';
import 'package:nyxx/src/models/events/stage_instance.dart';
import 'package:nyxx/src/models/events/voice.dart';
import 'package:nyxx/src/models/events/webhook.dart';
import 'package:nyxx/src/models/interaction.dart';
import 'package:nyxx/src/utils/iterable_extension.dart';

Expand Down
Loading

0 comments on commit f5ab177

Please sign in to comment.