Skip to content

Commit

Permalink
fix update builder
Browse files Browse the repository at this point in the history
  • Loading branch information
Lexedia committed Oct 9, 2024
1 parent 3e9256e commit be15251
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions lib/src/builders/soundboard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ class SoundboardSoundBuilder extends CreateBuilder<SoundboardSound> {
};
}

class UpdateSoundBuilder extends UpdateBuilder<SoundboardSound> {
class UpdateSoundboardSoundBuilder extends UpdateBuilder<SoundboardSound> {
String name;

double volume;
double? volume;

Emoji emoji;
Emoji? emoji;

UpdateSoundBuilder({required this.name, this.volume = sentinelDouble, this.emoji = sentinelEmoji});
UpdateSoundboardSoundBuilder({required this.name, this.volume = sentinelDouble, this.emoji = sentinelEmoji});

@override
Map<String, Object?> build() => {
Expand Down
2 changes: 1 addition & 1 deletion lib/src/http/managers/soundboard_manager.dart
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class GuildSoundboardManager extends SoundboardManager {
return soundboard;
}

Future<SoundboardSound> update(Snowflake id, UpdateSoundBuilder builder, {String? auditLogReason}) async {
Future<SoundboardSound> update(Snowflake id, UpdateSoundboardSoundBuilder builder, {String? auditLogReason}) async {
final route = HttpRoute()
..guilds(id: guildId.toString())
..soundboardSounds(id: id.toString());
Expand Down
2 changes: 1 addition & 1 deletion lib/src/models/soundboard/soundboard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class PartialSoundboardSound extends ManagedSnowflakeEntity<SoundboardSound> {
PartialSoundboardSound({required super.id, required this.manager});

/// Update this entity using the provided builder and return the updated entity.
Future<SoundboardSound> update(UpdateSoundBuilder builder) {
Future<SoundboardSound> update(UpdateSoundboardSoundBuilder builder) {
assert(manager is GuildSoundboardManager);

return (manager as GuildSoundboardManager).update(id, builder);
Expand Down

0 comments on commit be15251

Please sign in to comment.