diff --git a/lib/src/api/common/activity.dart b/lib/src/api/common/activity.dart index b366d366..3159eaa6 100644 --- a/lib/src/api/common/activity.dart +++ b/lib/src/api/common/activity.dart @@ -36,6 +36,6 @@ final class Activity { fn: () => ActivityEmoji( name: json['name'], id: json['id'], - animated: json['animated'] ?? false))); + isAnimated: json['animated'] ?? false))); } } diff --git a/lib/src/api/common/activity_emoji.dart b/lib/src/api/common/activity_emoji.dart index 73dbba04..331124d5 100644 --- a/lib/src/api/common/activity_emoji.dart +++ b/lib/src/api/common/activity_emoji.dart @@ -1,11 +1,11 @@ final class ActivityEmoji { final String name; final String? id; - final bool animated; + final bool isAnimated; ActivityEmoji({ required this.name, required this.id, - required this.animated, + required this.isAnimated, }); } diff --git a/lib/src/api/common/channel_properties.dart b/lib/src/api/common/channel_properties.dart index da9f7be1..57f5fd28 100644 --- a/lib/src/api/common/channel_properties.dart +++ b/lib/src/api/common/channel_properties.dart @@ -18,7 +18,7 @@ final class ChannelProperties { final Snowflake? serverId; final Snowflake? categoryId; final int? position; - final bool nsfw; + final bool isNsfw; final Snowflake? lastMessageId; final int? bitrate; final int? userLimit; @@ -51,7 +51,7 @@ final class ChannelProperties { required this.serverId, required this.categoryId, required this.position, - required this.nsfw, + required this.isNsfw, required this.lastMessageId, required this.bitrate, required this.userLimit, @@ -105,7 +105,7 @@ final class ChannelProperties { serverId: Snowflake.nullable(element['server_id']), categoryId: Snowflake.nullable(element['parent_id']), position: element['position'], - nsfw: element['nsfw'] ?? false, + isNsfw: element['nsfw'] ?? false, lastMessageId: Snowflake.nullable(element['last_message_id']), bitrate: element['bitrate'], userLimit: element['user_limit'], diff --git a/lib/src/api/common/commands/builder/command_definition_builder.dart b/lib/src/api/common/commands/builder/command_definition_builder.dart index 2fcce60f..3cbec6c6 100644 --- a/lib/src/api/common/commands/builder/command_definition_builder.dart +++ b/lib/src/api/common/commands/builder/command_definition_builder.dart @@ -79,29 +79,29 @@ final class CommandDefinitionBuilder implements CommandBuilder { final String name = _extractDefaultValue('option', 'name', element); final String description = _extractDefaultValue('option', 'description', element); - final bool required = element['required'] ?? false; + final bool isRequired = element['required'] ?? false; final option = switch (element['type']) { final String value when value == 'string' => Option.string( - name: name, description: description, required: required), + name: name, description: description, isRequired: isRequired), final String value when value == 'integer' => Option.integer( - name: name, description: description, required: required), + name: name, description: description, isRequired: isRequired), final String value when value == 'double' => Option.double( - name: name, description: description, required: required), + name: name, description: description, isRequired: isRequired), final String value when value == 'string' => Option.boolean( - name: name, description: description, required: required), + name: name, description: description, isRequired: isRequired), final String value when value == 'user' => - Option.user(name: name, description: description, required: required), + Option.user(name: name, description: description, isRequired: isRequired), final String value when value == 'channel' => Option.channel( - name: name, description: description, required: required), + name: name, description: description, isRequired: isRequired), final String value when value == 'role' => - Option.role(name: name, description: description, required: required), + Option.role(name: name, description: description, isRequired: isRequired), final String value when value == 'mention' => Option.mentionable( - name: name, description: description, required: required), + name: name, description: description, isRequired: isRequired), final String value when value == 'choice.string' => ChoiceOption.string( name: name, description: description, - required: required, + isRequired: isRequired, choices: List.from(element['choices'] ?? []) .map((element) => Choice(element['name'], element['value'])) @@ -110,7 +110,7 @@ final class CommandDefinitionBuilder implements CommandBuilder { ChoiceOption.integer( name: name, description: description, - required: required, + isRequired: isRequired, choices: List.from(element['choices'] ?? []) .map((element) => Choice(element['name'], int.parse(element['value']))) @@ -118,7 +118,7 @@ final class CommandDefinitionBuilder implements CommandBuilder { final String value when value == 'choice.double' => ChoiceOption.double( name: name, description: description, - required: required, + isRequired: isRequired, choices: List.from(element['choices'] ?? []) .map((element) => Choice(element['name'], double.parse(element['value']))) diff --git a/lib/src/api/common/commands/command_choice_option.dart b/lib/src/api/common/commands/command_choice_option.dart index 67925261..a926c701 100644 --- a/lib/src/api/common/commands/command_choice_option.dart +++ b/lib/src/api/common/commands/command_choice_option.dart @@ -39,25 +39,25 @@ final class ChoiceOption implements CommandOption { {required String name, required String description, required List> choices, - bool required = false}) => + bool isRequired = false}) => ChoiceOption._( - name, description, CommandOptionType.string, required, null, choices); + name, description, CommandOptionType.string, isRequired, null, choices); factory ChoiceOption.integer( {required String name, required String description, required List> choices, - bool required = false}) => - ChoiceOption._(name, description, CommandOptionType.integer, required, + bool isRequired = false}) => + ChoiceOption._(name, description, CommandOptionType.integer, isRequired, null, choices); factory ChoiceOption.double( {required String name, required String description, required List> choices, - bool required = false}) => + bool isRequired = false}) => ChoiceOption._( - name, description, CommandOptionType.double, required, null, choices); + name, description, CommandOptionType.double, isRequired, null, choices); } final class Choice { diff --git a/lib/src/api/common/commands/command_option.dart b/lib/src/api/common/commands/command_option.dart index 0636f5b7..483e29f2 100644 --- a/lib/src/api/common/commands/command_option.dart +++ b/lib/src/api/common/commands/command_option.dart @@ -48,57 +48,57 @@ final class Option implements CommandOption { factory Option.string( {required String name, required String description, - bool required = false}) => - Option._(name, description, CommandOptionType.string, null, required); + bool isRequired = false}) => + Option._(name, description, CommandOptionType.string, null, isRequired); factory Option.integer( {required String name, required String description, - bool required = false}) => - Option._(name, description, CommandOptionType.integer, null, required); + bool isRequired = false}) => + Option._(name, description, CommandOptionType.integer, null, isRequired); factory Option.double( {required String name, required String description, - bool required = false}) => - Option._(name, description, CommandOptionType.double, null, required); + bool isRequired = false}) => + Option._(name, description, CommandOptionType.double, null, isRequired); factory Option.boolean( {required String name, required String description, - bool required = false}) => - Option._(name, description, CommandOptionType.boolean, null, required); + bool isRequired = false}) => + Option._(name, description, CommandOptionType.boolean, null, isRequired); factory Option.user( {required String name, required String description, - bool required = false}) => - Option._(name, description, CommandOptionType.user, null, required); + bool isRequired = false}) => + Option._(name, description, CommandOptionType.user, null, isRequired); factory Option.channel( {required String name, required String description, List channels = const [], - bool required = false}) => + bool isRequired = false}) => Option._( - name, description, CommandOptionType.channel, channels, required); + name, description, CommandOptionType.channel, channels, isRequired); factory Option.role( {required String name, required String description, - bool required = false}) => - Option._(name, description, CommandOptionType.role, null, required); + bool isRequired = false}) => + Option._(name, description, CommandOptionType.role, null, isRequired); factory Option.mentionable( {required String name, required String description, - bool required = false}) => + bool isRequired = false}) => Option._( - name, description, CommandOptionType.mentionable, null, required); + name, description, CommandOptionType.mentionable, null, isRequired); factory Option.attachment( {required String name, required String description, - bool required = false}) => - Option._(name, description, CommandOptionType.attachment, null, required); + bool isRequired = false}) => + Option._(name, description, CommandOptionType.attachment, null, isRequired); } diff --git a/lib/src/api/common/components/builder/message_builder.dart b/lib/src/api/common/components/builder/message_builder.dart index 9087e620..59a80f07 100644 --- a/lib/src/api/common/components/builder/message_builder.dart +++ b/lib/src/api/common/components/builder/message_builder.dart @@ -393,13 +393,13 @@ final class MessageBuilder { /// ``` /// /// Parameters: - /// - [show]: Whether to display the separator line (default: true) + /// - [isDividerVisible]: Whether to display the separator line (default: true) /// - [spacing]: The amount of vertical space (default: [SeparatorSize.small]) void addSeparator({ - bool show = true, + bool isDividerVisible = true, SeparatorSize spacing = SeparatorSize.small, }) { - _components.add(Separator(show, spacing)); + _components.add(Separator(isDividerVisible, spacing)); } /// Adds text content to the message. diff --git a/lib/src/api/common/components/button.dart b/lib/src/api/common/components/button.dart index 162ddb65..1b806ff5 100644 --- a/lib/src/api/common/components/button.dart +++ b/lib/src/api/common/components/button.dart @@ -20,7 +20,7 @@ final class Button implements MessageComponent { final String? _label; final String? _url; final PartialEmoji? _emoji; - final bool _disabled; + final bool _isDisabled; Button( {required ButtonType type, @@ -34,7 +34,7 @@ final class Button implements MessageComponent { _label = label, _url = url, _emoji = emoji, - _disabled = disabled ?? false; + _isDisabled = disabled ?? false; factory Button.primary(String customId, {String? label, PartialEmoji? emoji, bool? disabled}) => @@ -98,12 +98,12 @@ final class Button implements MessageComponent { 'style': _type.value, if (_url != null) 'url': _url, if (_label != null) 'label': _label, - if (_disabled) 'disabled': _disabled, + if (_isDisabled) 'disabled': _isDisabled, if (_emoji != null) 'emoji': { 'name': _emoji.name, 'id': _emoji.id, - 'animated': _emoji.animated, + 'animated': _emoji.isAnimated, }, }; } diff --git a/lib/src/api/common/components/select_menu.dart b/lib/src/api/common/components/select_menu.dart index ed123685..adb2b784 100644 --- a/lib/src/api/common/components/select_menu.dart +++ b/lib/src/api/common/components/select_menu.dart @@ -9,7 +9,7 @@ final class SelectMenu implements MessageComponent, ModalComponent { int? _maxLength; int? _minValues; int? _maxValues; - bool? _disabled; + bool? _isDisabled; final List> _options; final List _defaultValues; @@ -30,7 +30,7 @@ final class SelectMenu implements MessageComponent, ModalComponent { _maxLength = maxLength, _minValues = minValues, _maxValues = maxValues, - _disabled = disabled, + _isDisabled = disabled, _options = options ?? [], _defaultValues = defaultValues ?? [], _channelTypes = channelTypes ?? []; @@ -118,7 +118,7 @@ final class SelectMenu implements MessageComponent, ModalComponent { 'type': _type.value, 'custom_id': _customId, 'placeholder': _placeholder, - 'disabled': _disabled, + 'disabled': _isDisabled, if (_minValues != null) 'min_values': _minValues, if (_maxValues != null) 'max_values': _maxValues, if (_minLength != null) 'min_length': _minLength, @@ -166,7 +166,7 @@ final class SelectMenuOption { 'emoji': { 'name': emoji?.name, 'id': emoji?.id, - 'animated': emoji?.animated, + 'animated': emoji?.isAnimated, }, 'default': isDefault, }; diff --git a/lib/src/api/common/components/separator.dart b/lib/src/api/common/components/separator.dart index 6c38b607..019bdf2e 100644 --- a/lib/src/api/common/components/separator.dart +++ b/lib/src/api/common/components/separator.dart @@ -11,16 +11,16 @@ enum SeparatorSize { final class Separator implements MessageComponent { ComponentType get type => ComponentType.separator; - final bool _show; + final bool _isDividerVisible; final SeparatorSize _spacing; - Separator(this._show, this._spacing); + Separator(this._isDividerVisible, this._spacing); @override Map toJson() { return { 'type': type.value, - 'divider': _show, + 'divider': _isDividerVisible, 'spacing': _spacing.value, }; } diff --git a/lib/src/api/common/embed/message_embed_builder.dart b/lib/src/api/common/embed/message_embed_builder.dart index 4a7dae76..47e9a765 100644 --- a/lib/src/api/common/embed/message_embed_builder.dart +++ b/lib/src/api/common/embed/message_embed_builder.dart @@ -52,8 +52,8 @@ final class MessageEmbedBuilder { } MessageEmbedBuilder addField( - {required String name, required String value, bool inline = false}) { - fields.add(MessageEmbedField(name: name, value: value, inline: inline)); + {required String name, required String value, bool isInline = false}) { + fields.add(MessageEmbedField(name: name, value: value, isInline: isInline)); return this; } diff --git a/lib/src/api/common/embed/message_embed_field.dart b/lib/src/api/common/embed/message_embed_field.dart index a33f3f95..4a3007a6 100644 --- a/lib/src/api/common/embed/message_embed_field.dart +++ b/lib/src/api/common/embed/message_embed_field.dart @@ -3,10 +3,10 @@ import 'package:mineral/src/domains/common/utils/utils.dart'; final class MessageEmbedField { final String name; final String value; - final bool inline; + final bool isInline; MessageEmbedField( - {required this.name, required this.value, this.inline = false}) { + {required this.name, required this.value, this.isInline = false}) { expectOrThrow(name.length <= 256, message: 'Name must be 256 or fewer in length'); expectOrThrow(value.length <= 1024, @@ -17,7 +17,7 @@ final class MessageEmbedField { return { 'name': name, 'value': value, - 'inline': inline, + 'inline': isInline, }; } @@ -25,7 +25,7 @@ final class MessageEmbedField { return MessageEmbedField( name: json['name'], value: json['value'], - inline: json['inline'], + isInline: json['inline'], ); } } diff --git a/lib/src/api/common/emoji.dart b/lib/src/api/common/emoji.dart index 73e4f964..98d574d0 100644 --- a/lib/src/api/common/emoji.dart +++ b/lib/src/api/common/emoji.dart @@ -7,18 +7,18 @@ final class Emoji extends PartialEmoji { final Snowflake serverId; final Map roles; - final bool managed; - final bool available; + final bool isManaged; + final bool isAvailable; Emoji( this.serverId, { required Snowflake id, required String name, required this.roles, - required this.managed, - required this.available, - required bool animated, - }) : super(id, name, animated); + required this.isManaged, + required this.isAvailable, + required bool isAnimated, + }) : super(id, name, isAnimated); /// Update image /// ```dart diff --git a/lib/src/api/common/message.dart b/lib/src/api/common/message.dart index d0112f4d..e8a9e5d8 100644 --- a/lib/src/api/common/message.dart +++ b/lib/src/api/common/message.dart @@ -10,7 +10,7 @@ abstract interface class BaseMessage { String get content; - bool get authorIsBot; + bool get isAuthorBot; List get embeds; @@ -78,7 +78,7 @@ final class Message implements ServerMessage, PrivateMessage, BaseMessage { String get content => _properties.content; @override - bool get authorIsBot => _properties.authorIsBot; + bool get isAuthorBot => _properties.isAuthorBot; @override List get embeds => _properties.embeds; diff --git a/lib/src/api/common/message_properties.dart b/lib/src/api/common/message_properties.dart index df8ff931..2903a98f 100644 --- a/lib/src/api/common/message_properties.dart +++ b/lib/src/api/common/message_properties.dart @@ -11,7 +11,7 @@ final class MessageProperties { final Snowflake channelId; final Snowflake? authorId; final Snowflake? serverId; - final bool authorIsBot; + final bool isAuthorBot; final List embeds; final DateTime createdAt; final DateTime? updatedAt; @@ -22,7 +22,7 @@ final class MessageProperties { required this.channelId, required this.authorId, required this.serverId, - required this.authorIsBot, + required this.isAuthorBot, required this.embeds, required this.createdAt, required this.updatedAt, @@ -40,7 +40,7 @@ final class MessageProperties { channelId: Snowflake.parse(json['channel_id']), authorId: Snowflake.nullable(json['author_id']), serverId: Snowflake.nullable(json['server_id']), - authorIsBot: json['author_is_bot'] ?? false, + isAuthorBot: json['author_is_bot'] ?? false, embeds: embeds, createdAt: DateTime.parse(json['timestamp']), updatedAt: Helper.createOrNull( diff --git a/lib/src/api/common/partial_emoji.dart b/lib/src/api/common/partial_emoji.dart index e6f07d31..98f2d080 100644 --- a/lib/src/api/common/partial_emoji.dart +++ b/lib/src/api/common/partial_emoji.dart @@ -4,19 +4,19 @@ import 'package:mineral/src/api/common/snowflake.dart'; class PartialEmoji { final Snowflake? id; final String name; - final bool animated; + final bool isAnimated; - const PartialEmoji(this.id, this.name, this.animated); + const PartialEmoji(this.id, this.name, this.isAnimated); factory PartialEmoji.fromUnicode(String value) => PartialEmoji(null, value, false); factory PartialEmoji.fromEmoji(Emoji emoji) => - PartialEmoji(emoji.id, emoji.name, emoji.animated); + PartialEmoji(emoji.id, emoji.name, emoji.isAnimated); Map toJson() => { 'id': id?.value, 'name': name, - 'animated': animated, + 'animated': isAnimated, }; } diff --git a/lib/src/api/common/polls/poll.dart b/lib/src/api/common/polls/poll.dart index 4f5553b0..334805a0 100644 --- a/lib/src/api/common/polls/poll.dart +++ b/lib/src/api/common/polls/poll.dart @@ -7,7 +7,7 @@ final class Poll { final PollQuestion question; final List answers; final Duration? expireAt; - final bool isAllowMultiple; + final bool isMultipleResponseAllowed; final Snowflake? messageId; final PollLayout layout; @@ -15,7 +15,7 @@ final class Poll { required this.question, required this.answers, required this.expireAt, - required this.isAllowMultiple, + required this.isMultipleResponseAllowed, this.messageId, this.layout = PollLayout.initial, }); diff --git a/lib/src/api/common/polls/poll_builder.dart b/lib/src/api/common/polls/poll_builder.dart index 61ca46ff..7a73931e 100644 --- a/lib/src/api/common/polls/poll_builder.dart +++ b/lib/src/api/common/polls/poll_builder.dart @@ -8,7 +8,7 @@ final class PollBuilder { PollQuestion? _question; final List _answers = []; Duration? _expireAt; - bool _isAllowMultiple = false; + bool _isMultipleResponsesAllowed = false; PollLayout _layout = PollLayout.initial; PollBuilder setQuestion({required String question, PartialEmoji? emoji}) { @@ -27,7 +27,7 @@ final class PollBuilder { } PollBuilder allowMultipleResponses(bool value) { - _isAllowMultiple = value; + _isMultipleResponsesAllowed = value; return this; } @@ -45,7 +45,7 @@ final class PollBuilder { question: _question!, answers: _answers, expireAt: _expireAt, - isAllowMultiple: _isAllowMultiple, + isMultipleResponseAllowed: _isMultipleResponsesAllowed, layout: _layout, ); } diff --git a/lib/src/api/common/presence.dart b/lib/src/api/common/presence.dart index d53e2d24..c7619c0c 100644 --- a/lib/src/api/common/presence.dart +++ b/lib/src/api/common/presence.dart @@ -5,13 +5,13 @@ final class Presence { final DateTime? since; final List activities; final StatusType status; - final bool afk; + final bool isAfk; Presence({ required this.since, required this.activities, required this.status, - required this.afk, + required this.isAfk, }); factory Presence.fromJson(Map json) { @@ -21,7 +21,7 @@ final class Presence { json['activities'].map((e) => Activity.fromJson(e))), status: StatusType.values .firstWhere((element) => element.value == json['status']), - afk: json['afk'] ?? false, + isAfk: json['afk'] ?? false, ); } } diff --git a/lib/src/api/server/audit_log/actions/invite.dart b/lib/src/api/server/audit_log/actions/invite.dart index 692cf18a..960ebbdb 100644 --- a/lib/src/api/server/audit_log/actions/invite.dart +++ b/lib/src/api/server/audit_log/actions/invite.dart @@ -5,7 +5,7 @@ final class InviteCreateAuditLog extends AuditLog { final String inviteCode; final int maxAge; final int maxUses; - final bool temporary; + final bool isInviteTemporary; final Snowflake? channelId; InviteCreateAuditLog({ @@ -14,7 +14,7 @@ final class InviteCreateAuditLog extends AuditLog { required this.inviteCode, required this.maxAge, required this.maxUses, - required this.temporary, + required this.isInviteTemporary, this.channelId, }) : super(AuditLogType.inviteCreate, serverId, userId); } diff --git a/lib/src/api/server/audit_log/actions/role.dart b/lib/src/api/server/audit_log/actions/role.dart index b00b630e..cad4dc0a 100644 --- a/lib/src/api/server/audit_log/actions/role.dart +++ b/lib/src/api/server/audit_log/actions/role.dart @@ -20,10 +20,10 @@ final class RoleCreateAuditLog extends AuditLog { Color get roleColor => Color.of(changes.firstWhere((element) => element.key == 'color').after); - bool get roleIsHoist => + bool get isRoleHoisted => changes.firstWhere((element) => element.key == 'hoist').after; - bool get roleIsMentionable => + bool get isRoleMentionable => changes.firstWhere((element) => element.key == 'mentionable').after; RoleCreateAuditLog( diff --git a/lib/src/api/server/channels/private_thread_channel.dart b/lib/src/api/server/channels/private_thread_channel.dart index 7131adc4..067aae76 100644 --- a/lib/src/api/server/channels/private_thread_channel.dart +++ b/lib/src/api/server/channels/private_thread_channel.dart @@ -97,8 +97,8 @@ class PrivateThreadChannel extends ServerChannel implements ThreadChannel { /// ```dart /// await channel.setNsfw(true); /// ``` - Future setNsfw(bool nsfw, {String? reason}) => - _methods.setNsfw(nsfw, reason); + Future setNsfw(bool value, {String? reason}) => + _methods.setNsfw(value, reason); /// Sets the rate limit per user for the channel. /// diff --git a/lib/src/api/server/channels/public_thread_channel.dart b/lib/src/api/server/channels/public_thread_channel.dart index 0157e869..df570560 100644 --- a/lib/src/api/server/channels/public_thread_channel.dart +++ b/lib/src/api/server/channels/public_thread_channel.dart @@ -97,8 +97,8 @@ class PublicThreadChannel extends ServerChannel implements ThreadChannel { /// ```dart /// await channel.setNsfw(true); /// ``` - Future setNsfw(bool nsfw, {String? reason}) => - _methods.setNsfw(nsfw, reason); + Future setNsfw(bool value, {String? reason}) => + _methods.setNsfw(value, reason); /// Sets the rate limit per user for the channel. /// diff --git a/lib/src/api/server/channels/server_announcement_channel.dart b/lib/src/api/server/channels/server_announcement_channel.dart index 624a15d7..f511f739 100644 --- a/lib/src/api/server/channels/server_announcement_channel.dart +++ b/lib/src/api/server/channels/server_announcement_channel.dart @@ -26,7 +26,7 @@ final class ServerAnnouncementChannel extends ServerChannel { String? get description => _properties.description; - bool get isNsfw => _properties.nsfw; + bool get isNsfw => _properties.isNsfw; @override Snowflake get serverId => _properties.serverId!; @@ -79,8 +79,8 @@ final class ServerAnnouncementChannel extends ServerChannel { /// ```dart /// await channel.setNsfw(true); /// ``` - Future setNsfw(bool nsfw, {String? reason}) => - _methods.setNsfw(nsfw, reason); + Future setNsfw(bool value, {String? reason}) => + _methods.setNsfw(value, reason); /// Deletes the channel. /// diff --git a/lib/src/api/server/channels/server_stage_channel.dart b/lib/src/api/server/channels/server_stage_channel.dart index 1096db6e..6e483875 100644 --- a/lib/src/api/server/channels/server_stage_channel.dart +++ b/lib/src/api/server/channels/server_stage_channel.dart @@ -77,8 +77,8 @@ final class ServerStageChannel extends ServerChannel { /// ```dart /// await channel.setNsfw(true); /// ``` - Future setNsfw(bool nsfw, {String? reason}) => - _methods.setNsfw(nsfw, reason); + Future setNsfw(bool value, {String? reason}) => + _methods.setNsfw(value, reason); /// Sets the rate limit per user for the channel. /// diff --git a/lib/src/api/server/channels/server_text_channel.dart b/lib/src/api/server/channels/server_text_channel.dart index d0b7afe2..b4fe0c61 100644 --- a/lib/src/api/server/channels/server_text_channel.dart +++ b/lib/src/api/server/channels/server_text_channel.dart @@ -76,8 +76,8 @@ final class ServerTextChannel extends ServerChannel { /// ```dart /// await channel.setNsfw(true); /// ``` - Future setNsfw(bool nsfw, {String? reason}) => - _methods.setNsfw(nsfw, reason); + Future setNsfw(bool value, {String? reason}) => + _methods.setNsfw(value, reason); /// Sets the rate limit per user for the channel. /// diff --git a/lib/src/api/server/channels/server_voice_channel.dart b/lib/src/api/server/channels/server_voice_channel.dart index 0b42041e..7a749135 100644 --- a/lib/src/api/server/channels/server_voice_channel.dart +++ b/lib/src/api/server/channels/server_voice_channel.dart @@ -69,8 +69,8 @@ final class ServerVoiceChannel extends ServerChannel { /// ```dart /// await channel.setNsfw(true); /// ``` - Future setNsfw(bool nsfw, {String? reason}) => - _methods.setNsfw(nsfw, reason); + Future setNsfw(bool value, {String? reason}) => + _methods.setNsfw(value, reason); /// Sets the rate limit per user for the channel. /// diff --git a/lib/src/api/server/managers/role_manager.dart b/lib/src/api/server/managers/role_manager.dart index 33fdebfe..ea6bf72c 100644 --- a/lib/src/api/server/managers/role_manager.dart +++ b/lib/src/api/server/managers/role_manager.dart @@ -31,8 +31,8 @@ final class RoleManager { {required String name, required List permissions, required Color color, - bool hoist = false, + bool hoisted = false, bool mentionable = false, String? reason}) => - _datastore.role.create(_serverId.value, name, permissions, color, hoist, mentionable, reason); + _datastore.role.create(_serverId.value, name, permissions, color, hoisted, mentionable, reason); } diff --git a/lib/src/api/server/managers/rules_manager.dart b/lib/src/api/server/managers/rules_manager.dart index 978704c5..e798d7b2 100644 --- a/lib/src/api/server/managers/rules_manager.dart +++ b/lib/src/api/server/managers/rules_manager.dart @@ -39,7 +39,7 @@ final class RulesManager { TriggerMetadata? triggerMetadata, List exemptRoles = const [], List exemptChannels = const [], - bool enabled = true, + bool isEnabled = true, String? reason, }) => _datastore.rules.create( @@ -51,7 +51,7 @@ final class RulesManager { triggerMetadata: triggerMetadata, exemptRoles: exemptRoles, exemptChannels: exemptChannels, - enabled: enabled, + isEnabled: isEnabled, reason: reason, ); } diff --git a/lib/src/api/server/member.dart b/lib/src/api/server/member.dart index ea14c020..97e8a1ea 100644 --- a/lib/src/api/server/member.dart +++ b/lib/src/api/server/member.dart @@ -23,7 +23,7 @@ final class Member implements UserClient { final bool isBot; final bool isPending; final MemberTimeout timeout; - final bool mfaEnabled; + final bool hasMfaEnabled; final String? locale; final PremiumTier premiumType; final DateTime? joinedAt; @@ -203,7 +203,7 @@ final class Member implements UserClient { /// await member.toggleMfa(reason: 'Testing'); /// ``` Future toggleMfa({String? reason}) => - mfaEnabled ? disableMfa(reason: reason) : enableMfa(reason: reason); + hasMfaEnabled ? disableMfa(reason: reason) : enableMfa(reason: reason); /// Edit the member. /// @@ -240,7 +240,7 @@ final class Member implements UserClient { required this.isBot, required this.isPending, required this.timeout, - required this.mfaEnabled, + required this.hasMfaEnabled, required this.locale, required this.premiumType, required this.joinedAt, diff --git a/lib/src/api/server/moderation/auto_moderation_rule.dart b/lib/src/api/server/moderation/auto_moderation_rule.dart index e5f0890c..9db1f23a 100644 --- a/lib/src/api/server/moderation/auto_moderation_rule.dart +++ b/lib/src/api/server/moderation/auto_moderation_rule.dart @@ -12,7 +12,7 @@ final class AutoModerationRule { final TriggerType triggerTypes; final TriggerMetadata triggerMetadata; final List action; - final bool enabled; + final bool isEnabled; final List exemptRoles; final List exemptChannels; @@ -25,7 +25,7 @@ final class AutoModerationRule { required this.triggerTypes, required this.triggerMetadata, required this.action, - required this.enabled, + required this.isEnabled, required this.exemptRoles, required this.exemptChannels, }); diff --git a/lib/src/api/server/role.dart b/lib/src/api/server/role.dart index 1cb4ad57..f716e7b6 100644 --- a/lib/src/api/server/role.dart +++ b/lib/src/api/server/role.dart @@ -11,10 +11,10 @@ final class Role { final Snowflake id; final String name; final Color color; - final bool hoist; + final bool isHoisted; final int position; - final bool managed; - final bool mentionable; + final bool isManaged; + final bool isMentionable; final int flags; final String? icon; final String? unicodeEmoji; @@ -25,11 +25,11 @@ final class Role { required this.id, required this.name, required this.color, - required this.hoist, + required this.isHoisted, required this.position, required this.permissions, - required this.managed, - required this.mentionable, + required this.isManaged, + required this.isMentionable, required this.flags, required this.icon, required this.unicodeEmoji, @@ -69,12 +69,12 @@ final class Role { /// ```dart /// await role.setHoist(true, reason: 'Testing'); /// ``` - Future setHoist(bool hoist, String? reason) async { + Future setHoist(bool value, String? reason) async { await _datastore.role.update( id: id.value, serverId: serverId.value, reason: reason, - payload: {'hoist': hoist}, + payload: {'hoist': value}, ); } diff --git a/lib/src/api/server/threads/thread_metadata.dart b/lib/src/api/server/threads/thread_metadata.dart index d5260fcd..2670c934 100644 --- a/lib/src/api/server/threads/thread_metadata.dart +++ b/lib/src/api/server/threads/thread_metadata.dart @@ -1,23 +1,23 @@ final class ThreadMetadata { - final bool archived; + final bool isArchived; final int? autoArchiveDuration; - final bool locked; + final bool isLocked; final DateTime? archiveTimestamp; final bool isPublic; ThreadMetadata({ - required this.archived, + required this.isArchived, required this.autoArchiveDuration, - required this.locked, + required this.isLocked, this.isPublic = true, this.archiveTimestamp, }); factory ThreadMetadata.fromMap(Map json) { return ThreadMetadata( - archived: bool.parse(json['archived'] ?? 'false'), + isArchived: bool.parse(json['archived'] ?? 'false'), autoArchiveDuration: json['auto_archive_duration'], - locked: bool.parse(json['locked'] ?? 'false'), + isLocked: bool.parse(json['locked'] ?? 'false'), archiveTimestamp: json['archive_timestamp'] != null ? DateTime.parse(json['archive_timestamp']) : null, diff --git a/lib/src/domains/services/datastore/parts.dart b/lib/src/domains/services/datastore/parts.dart index 445136e9..24959ad7 100644 --- a/lib/src/domains/services/datastore/parts.dart +++ b/lib/src/domains/services/datastore/parts.dart @@ -136,7 +136,7 @@ abstract interface class RolePartContract implements DataStorePart { String name, List permissions, Color color, - bool hoist, + bool hoisted, bool mentionable, String? reason); @@ -248,7 +248,7 @@ abstract interface class RulesPartContract implements DataStorePart { TriggerMetadata? triggerMetadata, List exemptRoles = const [], List exemptChannels = const [], - bool enabled = true, + bool isEnabled = true, String? reason}); Future update( diff --git a/lib/src/domains/services/wss/sharding_config.dart b/lib/src/domains/services/wss/sharding_config.dart index 0265638a..33ccbe2b 100644 --- a/lib/src/domains/services/wss/sharding_config.dart +++ b/lib/src/domains/services/wss/sharding_config.dart @@ -13,7 +13,7 @@ abstract interface class ShardingConfigContract { int get intent; - bool get compress; + bool get isCompressed; int get version; diff --git a/lib/src/infrastructure/internals/datastore/parts/interaction_part.dart b/lib/src/infrastructure/internals/datastore/parts/interaction_part.dart index ea2f0ae0..50ba48c9 100644 --- a/lib/src/infrastructure/internals/datastore/parts/interaction_part.dart +++ b/lib/src/infrastructure/internals/datastore/parts/interaction_part.dart @@ -13,11 +13,11 @@ final class InteractionPart implements InteractionPartContract { @override Future replyInteraction(Snowflake id, String token, - MessageBuilder builder, bool ephemeral) async { + MessageBuilder builder, bool isEphemeral) async { final (components, files) = makeAttachmentFromBuilder(builder); int flags = MessageFlagType.isComponentV2.value; - if (ephemeral) { + if (isEphemeral) { flags += MessageFlagType.ephemeral.value; } @@ -35,11 +35,11 @@ final class InteractionPart implements InteractionPartContract { @override Future editInteraction(Snowflake id, String token, - MessageBuilder builder, bool ephemeral) async { + MessageBuilder builder, bool isEphemeral) async { final (components, files) = makeAttachmentFromBuilder(builder); int flags = MessageFlagType.isComponentV2.value; - if (ephemeral) { + if (isEphemeral) { flags += MessageFlagType.ephemeral.value; } @@ -63,12 +63,12 @@ final class InteractionPart implements InteractionPartContract { @override Future noReplyInteraction( - Snowflake id, String token, bool ephemeral) async { + Snowflake id, String token, bool isEphemeral) async { final req = Request.json( endpoint: '/webhooks/$id/$token/messages/@original', body: { 'type': InteractionCallbackType.deferredUpdateMessage.value, - 'data': {if (ephemeral) 'flags': MessageFlagType.ephemeral.value} + 'data': {if (isEphemeral) 'flags': MessageFlagType.ephemeral.value} }, ); @@ -77,11 +77,11 @@ final class InteractionPart implements InteractionPartContract { @override Future createFollowup(Snowflake id, String token, - MessageBuilder builder, bool ephemeral) async { + MessageBuilder builder, bool isEphemeral) async { final (components, files) = makeAttachmentFromBuilder(builder); int flags = MessageFlagType.isComponentV2.value; - if (ephemeral) { + if (isEphemeral) { flags += MessageFlagType.ephemeral.value; } @@ -99,11 +99,11 @@ final class InteractionPart implements InteractionPartContract { @override Future editFollowup(Snowflake botId, String token, Snowflake messageId, - MessageBuilder builder, bool ephemeral) async { + MessageBuilder builder, bool isEphemeral) async { final (components, files) = makeAttachmentFromBuilder(builder); int flags = MessageFlagType.isComponentV2.value; - if (ephemeral) { + if (isEphemeral) { flags += MessageFlagType.ephemeral.value; } diff --git a/lib/src/infrastructure/internals/datastore/parts/role_part.dart b/lib/src/infrastructure/internals/datastore/parts/role_part.dart index dd3a3320..53d84346 100644 --- a/lib/src/infrastructure/internals/datastore/parts/role_part.dart +++ b/lib/src/infrastructure/internals/datastore/parts/role_part.dart @@ -68,8 +68,8 @@ final class RolePart implements RolePartContract { String name, List permissions, Color color, - bool hoist, - bool mentionable, + bool isHoisted, + bool isMentionable, String? reason) async { final completer = Completer(); @@ -77,8 +77,8 @@ final class RolePart implements RolePartContract { 'name': name, 'permissions': listToBitfield(permissions), 'color': color.toInt(), - 'hoist': hoist, - 'mentionable': mentionable, + 'hoist': isHoisted, + 'mentionable': isMentionable, }, headers: { DiscordHeader.auditLogReason(reason) }); diff --git a/lib/src/infrastructure/internals/datastore/parts/rules_part.dart b/lib/src/infrastructure/internals/datastore/parts/rules_part.dart index 7a745a5b..0bd69ee5 100644 --- a/lib/src/infrastructure/internals/datastore/parts/rules_part.dart +++ b/lib/src/infrastructure/internals/datastore/parts/rules_part.dart @@ -76,7 +76,7 @@ final class RulesPart implements RulesPartContract { TriggerMetadata? triggerMetadata, List exemptRoles = const [], List exemptChannels = const [], - bool enabled = true, + bool isEnabled = true, String? reason, }) async { final completer = Completer(); @@ -107,7 +107,7 @@ final class RulesPart implements RulesPartContract { .toList(), 'exempt_roles': exemptRoles.map((e) => e.toString()).toList(), 'exempt_channels': exemptChannels.map((e) => e.toString()).toList(), - 'enabled': enabled, + 'enabled': isEnabled, }, headers: { DiscordHeader.auditLogReason(reason) diff --git a/lib/src/infrastructure/internals/marshaller/cache_key.dart b/lib/src/infrastructure/internals/marshaller/cache_key.dart index 1ae3d166..8c47eb24 100644 --- a/lib/src/infrastructure/internals/marshaller/cache_key.dart +++ b/lib/src/infrastructure/internals/marshaller/cache_key.dart @@ -3,24 +3,24 @@ import 'package:uuid/uuid.dart'; final class CacheKey { String server(Object id) => 'server/$id'; - String serverAssets(Object serverId, {bool ref = false}) { + String serverAssets(Object serverId, {bool isRef = false}) { final key = '${server(serverId)}/assets'; - return ref ? 'ref:$key' : key; + return isRef ? 'ref:$key' : key; } - String serverSettings(String serverId, {bool ref = false}) { + String serverSettings(String serverId, {bool isRef = false}) { final key = '${server(serverId)}/settings'; - return ref ? 'ref:$key' : key; + return isRef ? 'ref:$key' : key; } - String serverRules(Object serverId, Object ruleId, {bool ref = false}) { + String serverRules(Object serverId, Object ruleId, {bool isRef = false}) { final key = '${server(serverId)}/rules/$ruleId'; - return ref ? 'ref:$key' : key; + return isRef ? 'ref:$key' : key; } - String serverSubscription(String serverId, {bool ref = false}) { + String serverSubscription(String serverId, {bool isRef = false}) { final key = '${server(serverId)}/subscriptions'; - return ref ? 'ref:$key' : key; + return isRef ? 'ref:$key' : key; } String channel(Object channelId) => 'channels/$channelId'; @@ -31,19 +31,19 @@ final class CacheKey { String serverRole(Object serverId, Object roleId) => '${server(serverId)}/roles/$roleId'; - String member(Object serverId, Object memberId, {bool ref = false}) { + String member(Object serverId, Object memberId, {bool isRef = false}) { final key = '${server(serverId)}/members/$memberId'; - return ref ? 'ref:$key' : key; + return isRef ? 'ref:$key' : key; } - String memberAssets(Object serverId, Object memberId, {bool ref = false}) { + String memberAssets(Object serverId, Object memberId, {bool isRef = false}) { final key = '${member(serverId, memberId)}/assets'; - return ref ? 'ref:$key' : key; + return isRef ? 'ref:$key' : key; } - String user(Object userId, {bool ref = false}) { + String user(Object userId, {bool isRef = false}) { final key = 'users/$userId'; - return ref ? 'ref:$key' : key; + return isRef ? 'ref:$key' : key; } String voiceState(Object serverId, Object userId) => @@ -51,9 +51,9 @@ final class CacheKey { String invite(String code) => 'invites/$code'; - String userAssets(Object userId, {bool ref = false}) { + String userAssets(Object userId, {bool isRef = false}) { final key = '${user(userId)}/assets'; - return ref ? 'ref:$key' : key; + return isRef ? 'ref:$key' : key; } String serverEmoji(Object serverId, Object emojiId) => diff --git a/lib/src/infrastructure/internals/marshaller/factories/channels/server_public_thread_channel_factory.dart b/lib/src/infrastructure/internals/marshaller/factories/channels/server_public_thread_channel_factory.dart index d832a432..7fff24d5 100644 --- a/lib/src/infrastructure/internals/marshaller/factories/channels/server_public_thread_channel_factory.dart +++ b/lib/src/infrastructure/internals/marshaller/factories/channels/server_public_thread_channel_factory.dart @@ -70,11 +70,11 @@ final class ServerPublicThreadChannelFactory 'rtc_region': channel.rtcRegion, 'owner_id': channel.ownerId.value, 'thread_metadata': { - 'archived': channel.metadata.archived, + 'archived': channel.metadata.isArchived, 'archive_timestamp': channel.metadata.archiveTimestamp?.toIso8601String(), 'auto_archive_duration': channel.metadata.autoArchiveDuration, - 'locked': channel.metadata.locked, + 'locked': channel.metadata.isLocked, }, 'message_count': channel.messageCount, 'member_count': channel.memberCount, diff --git a/lib/src/infrastructure/internals/marshaller/factories/messages/server_message_factory.dart b/lib/src/infrastructure/internals/marshaller/factories/messages/server_message_factory.dart index 530a8a39..8d21a7fb 100644 --- a/lib/src/infrastructure/internals/marshaller/factories/messages/server_message_factory.dart +++ b/lib/src/infrastructure/internals/marshaller/factories/messages/server_message_factory.dart @@ -23,7 +23,7 @@ final class ServerMessageFactory implements MessageFactory { 'channel_id': message.channelId.value, 'author_id': message.authorId?.value, 'server_id': message.serverId.value, - 'author_is_bot': message.authorIsBot, + 'author_is_bot': message.isAuthorBot, 'created_at': message.createdAt.toIso8601String(), 'updated_at': message.updatedAt?.toIso8601String(), }; diff --git a/lib/src/infrastructure/internals/marshaller/serializers/emoji_serializer.dart b/lib/src/infrastructure/internals/marshaller/serializers/emoji_serializer.dart index c3e1ea22..d72befb7 100644 --- a/lib/src/infrastructure/internals/marshaller/serializers/emoji_serializer.dart +++ b/lib/src/infrastructure/internals/marshaller/serializers/emoji_serializer.dart @@ -47,9 +47,9 @@ final class EmojiSerializer implements SerializerContract { roles: roles?.fold( {}, (value, element) => {...?value, element.id: element}) ?? {}, - managed: json['managed'], - animated: json['animated'], - available: json['available'], + isManaged: json['managed'], + isAnimated: json['animated'], + isAvailable: json['available'], ); } @@ -59,9 +59,9 @@ final class EmojiSerializer implements SerializerContract { 'id': emoji.id?.value, 'name': emoji.name, 'roles': emoji.roles.keys.toList(), - 'managed': emoji.managed, - 'animated': emoji.animated, - 'available': emoji.available, + 'managed': emoji.isManaged, + 'animated': emoji.isAnimated, + 'available': emoji.isAvailable, 'server_id': emoji.serverId.value, }; } diff --git a/lib/src/infrastructure/internals/marshaller/serializers/member_serializer.dart b/lib/src/infrastructure/internals/marshaller/serializers/member_serializer.dart index fb766865..e6fb3387 100644 --- a/lib/src/infrastructure/internals/marshaller/serializers/member_serializer.dart +++ b/lib/src/infrastructure/internals/marshaller/serializers/member_serializer.dart @@ -106,7 +106,7 @@ final class MemberSerializer implements SerializerContract { duration: Helper.createOrNull( field: json['communication_disabled_until'], fn: () => DateTime.parse(json['communication_disabled_until']))), - mfaEnabled: json['mfa_enabled'] ?? false, + hasMfaEnabled: json['mfa_enabled'] ?? false, locale: json['locale'], premiumType: PremiumTier.values.firstWhere( (e) => e == json['premium_type'], @@ -143,7 +143,7 @@ final class MemberSerializer implements SerializerContract { 'is_bot': member.isBot, 'is_pending': member.isPending, 'timeout': member.timeout.duration?.toIso8601String(), - 'mfa_enabled': member.mfaEnabled, + 'mfa_enabled': member.hasMfaEnabled, 'locale': member.locale, 'premium_type': member.premiumType.value, 'joined_at': member.joinedAt?.toIso8601String(), diff --git a/lib/src/infrastructure/internals/marshaller/serializers/message_reaction_serializer.dart b/lib/src/infrastructure/internals/marshaller/serializers/message_reaction_serializer.dart index 43231e46..bdfe3290 100644 --- a/lib/src/infrastructure/internals/marshaller/serializers/message_reaction_serializer.dart +++ b/lib/src/infrastructure/internals/marshaller/serializers/message_reaction_serializer.dart @@ -47,7 +47,7 @@ final class MessageReactionSerializer 'emoji': { 'id': object.emoji.id, 'name': object.emoji.name, - 'animated': object.emoji.animated, + 'animated': object.emoji.isAnimated, }, 'message_id': object.messageId.value, 'timestamp': object.isBurst, diff --git a/lib/src/infrastructure/internals/marshaller/serializers/message_serializer.dart b/lib/src/infrastructure/internals/marshaller/serializers/message_serializer.dart index 4f27d039..5402329d 100644 --- a/lib/src/infrastructure/internals/marshaller/serializers/message_serializer.dart +++ b/lib/src/infrastructure/internals/marshaller/serializers/message_serializer.dart @@ -47,7 +47,7 @@ final class MessageSerializer 'author_id': object.authorId?.value, 'channel_id': object.channelId.value, 'server_id': object.serverId?.value, - 'author_is_bot': object.authorIsBot, + 'author_is_bot': object.isAuthorBot, 'timestamp': object.createdAt.toIso8601String(), 'edited_timestamp': object.updatedAt?.toIso8601String(), }; diff --git a/lib/src/infrastructure/internals/marshaller/serializers/poll_serializer.dart b/lib/src/infrastructure/internals/marshaller/serializers/poll_serializer.dart index b934e7ce..7a5adfdd 100644 --- a/lib/src/infrastructure/internals/marshaller/serializers/poll_serializer.dart +++ b/lib/src/infrastructure/internals/marshaller/serializers/poll_serializer.dart @@ -47,7 +47,7 @@ final class PollSerializer implements SerializerContract { field: json['expiry'], fn: () => DateTime.parse(json['expiry']).difference(DateTime.now())), - isAllowMultiple: json['allow_multiselect'], + isMultipleResponseAllowed: json['allow_multiselect'], layout: findInEnum(PollLayout.values, json['layout_type'])); } @@ -63,7 +63,7 @@ final class PollSerializer implements SerializerContract { 'question_text': poll.question.content, 'answers': answers, 'expiry': poll.expireAt?.inMilliseconds, - 'allow_multiselect': poll.isAllowMultiple, + 'allow_multiselect': poll.isMultipleResponseAllowed, 'layout_type': poll.layout.value, }; } diff --git a/lib/src/infrastructure/internals/marshaller/serializers/role_serializer.dart b/lib/src/infrastructure/internals/marshaller/serializers/role_serializer.dart index 19a984d4..0833f65b 100644 --- a/lib/src/infrastructure/internals/marshaller/serializers/role_serializer.dart +++ b/lib/src/infrastructure/internals/marshaller/serializers/role_serializer.dart @@ -37,15 +37,15 @@ final class RoleSerializer implements SerializerContract { id: Snowflake.parse(json['id']), name: json['name'], color: Color.of(json['color'] ?? 0), - hoist: json['hoist'] ?? false, + isHoisted: json['hoist'] ?? false, position: json['position'] ?? 0, permissions: switch (json['permissions']) { int() => Permissions.fromInt(json['permissions']), String() => Permissions.fromInt(int.parse(json['permissions'])), _ => Permissions.fromInt(0), }, - managed: json['managed'], - mentionable: json['mentionable'], + isManaged: json['managed'], + isMentionable: json['mentionable'], flags: json['flags'], icon: json['icon'], unicodeEmoji: json['unicode_emoji'], @@ -58,11 +58,11 @@ final class RoleSerializer implements SerializerContract { 'id': object.id, 'name': object.name, 'color': object.color.toInt(), - 'hoist': object.hoist, + 'hoist': object.isHoisted, 'position': object.position, 'permissions': listToBitfield(object.permissions.list), - 'managed': object.managed, - 'mentionable': object.mentionable, + 'managed': object.isManaged, + 'mentionable': object.isMentionable, 'flags': object.flags, }; } diff --git a/lib/src/infrastructure/internals/marshaller/serializers/rule_serializer.dart b/lib/src/infrastructure/internals/marshaller/serializers/rule_serializer.dart index abf98d13..575d571c 100644 --- a/lib/src/infrastructure/internals/marshaller/serializers/rule_serializer.dart +++ b/lib/src/infrastructure/internals/marshaller/serializers/rule_serializer.dart @@ -49,7 +49,7 @@ final class RuleSerializer implements SerializerContract { final type = findInEnum(ActionType.values, action['type']); return Action(type: type); }).toList(), - enabled: json['enabled'] ?? true, + isEnabled: json['enabled'] ?? true, exemptRoles: List.from( (json['exemptRoles'] as List).map(Snowflake.parse)), exemptChannels: List.from( @@ -81,7 +81,7 @@ final class RuleSerializer implements SerializerContract { 'type': action.type.value, }) .toList(), - 'enabled': rule.enabled, + 'enabled': rule.isEnabled, 'exempt_roles': rule.exemptRoles.map((e) => e.toString()).toList(), 'exempt_channels': rule.exemptChannels.map((e) => e.toString()).toList(), }; diff --git a/lib/src/infrastructure/internals/packets/listeners/audit_logs/invite.dart b/lib/src/infrastructure/internals/packets/listeners/audit_logs/invite.dart index 1f5b11b4..efd44b17 100644 --- a/lib/src/infrastructure/internals/packets/listeners/audit_logs/invite.dart +++ b/lib/src/infrastructure/internals/packets/listeners/audit_logs/invite.dart @@ -9,7 +9,7 @@ Future inviteCreateAuditLogHandler(Map json) async { inviteCode: json['changes'][0]['new_value'], maxAge: json['options']?['max_age'] ?? 0, maxUses: json['options']?['max_uses'] ?? 0, - temporary: json['options']?['temporary'] ?? false, + isInviteTemporary: json['options']?['temporary'] ?? false, channelId: Snowflake.nullable(json['options']?['channel_id']), ); } diff --git a/lib/src/infrastructure/internals/wss/dispatchers/shard_authentication.dart b/lib/src/infrastructure/internals/wss/dispatchers/shard_authentication.dart index 3a630f2a..df616b59 100644 --- a/lib/src/infrastructure/internals/wss/dispatchers/shard_authentication.dart +++ b/lib/src/infrastructure/internals/wss/dispatchers/shard_authentication.dart @@ -24,7 +24,7 @@ final class ShardAuthentication implements ShardAuthenticationContract { ..setOpCode(OpCode.identify) ..append('token', shard.wss.config.token) ..append('intents', shard.wss.config.intent) - ..append('compress', shard.wss.config.compress) + ..append('compress', shard.wss.config.isCompressed) ..append('properties', {'os': 'macos', 'device': 'mineral'}); shard.client.send(message.build()); diff --git a/lib/src/infrastructure/internals/wss/sharding_config.dart b/lib/src/infrastructure/internals/wss/sharding_config.dart index bbe784d1..6dde05bb 100644 --- a/lib/src/infrastructure/internals/wss/sharding_config.dart +++ b/lib/src/infrastructure/internals/wss/sharding_config.dart @@ -8,7 +8,7 @@ final class ShardingConfig implements ShardingConfigContract { final int intent; @override - final bool compress; + final bool isCompressed; @override final int version; @@ -28,7 +28,7 @@ final class ShardingConfig implements ShardingConfigContract { required this.version, required this.encoding, this.shardCount, - this.compress = false, + this.isCompressed = false, this.largeThreshold = 50, }); }