Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for soundboard #708

Merged
merged 20 commits into from
Oct 16, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
add cache support for other events
  • Loading branch information
Lexedia committed Oct 10, 2024
commit d4c404041b1d8891e0dd9c8fc270f8d828fb04fa
5 changes: 5 additions & 0 deletions lib/src/utils/cache_helpers.dart
Original file line number Diff line number Diff line change
@@ -21,6 +21,7 @@ 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';
@@ -290,6 +291,10 @@ extension CacheUpdates on NyxxRest {
EntitlementUpdateEvent(:final entitlement) => updateCacheWith(entitlement),
EntitlementDeleteEvent(:final entitlement) => entitlement.manager.cache.remove(entitlement.id),
SoundboardSound(:final user) => updateCacheWith(user),
Lexedia marked this conversation as resolved.
Show resolved Hide resolved
VoiceChannelEffectSendEvent() => null,
SoundboardSoundCreateEvent(:final sound) => updateCacheWith(sound),
SoundboardSoundUpdateEvent(:final sound) => updateCacheWith(sound),
SoundboardSoundDeleteEvent() => null,
Lexedia marked this conversation as resolved.
Show resolved Hide resolved
MessagePollVoteAddEvent() => null,
MessagePollVoteRemoveEvent() => null,