diff --git a/DisCatSharp/Enums/Channel/SystemChannelFlags.cs b/DisCatSharp/Enums/Guild/SystemChannelFlags.cs similarity index 86% rename from DisCatSharp/Enums/Channel/SystemChannelFlags.cs rename to DisCatSharp/Enums/Guild/SystemChannelFlags.cs index efc1e6982..3a7fac72c 100644 --- a/DisCatSharp/Enums/Channel/SystemChannelFlags.cs +++ b/DisCatSharp/Enums/Guild/SystemChannelFlags.cs @@ -1,67 +1,77 @@ // This file is part of the DisCatSharp project, based off DSharpPlus. // // Copyright (c) 2021-2022 AITSYS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. using System; namespace DisCatSharp { /// /// Represents a system channel flags extension. /// public static class SystemChannelFlagsExtension { /// /// Calculates whether these system channel flags contain a specific flag. /// /// The existing flags. /// The flag to search for. /// public static bool HasSystemChannelFlag(this SystemChannelFlags baseFlags, SystemChannelFlags flag) => (baseFlags & flag) == flag; } /// /// Represents settings for a guild's system channel. /// [Flags] public enum SystemChannelFlags { /// /// Member join messages are disabled. /// SuppressJoinNotifications = 1 << 0, /// /// Server boost messages are disabled. /// SuppressPremiumSubscriptions = 1 << 1, /// /// Server setup tips are disabled. /// SuppressGuildReminderNotifications = 1 << 2, /// /// Suppress member join sticker replies. /// - SuppressJoinNotificationReplies = 1 << 3 + SuppressJoinNotificationReplies = 1 << 3, + + /// + /// Role subscription purchase messages are disabled. + /// + SuppressRoleSubbscriptionPurchaseNotification = 1<<4, + + /// + /// Suppress role subscription purchase sticker replies. + /// + SuppressRoleSubbscriptionPurchaseNotificationReplies = 1<<5, } } diff --git a/DisCatSharp/Enums/Message/MessageType.cs b/DisCatSharp/Enums/Message/MessageType.cs index e9f0f07dd..b1bca2b34 100644 --- a/DisCatSharp/Enums/Message/MessageType.cs +++ b/DisCatSharp/Enums/Message/MessageType.cs @@ -1,155 +1,160 @@ // This file is part of the DisCatSharp project, based off DSharpPlus. // // Copyright (c) 2021-2022 AITSYS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the rights // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell // copies of the Software, and to permit persons to whom the Software is // furnished to do so, subject to the following conditions: // // The above copyright notice and this permission notice shall be included in all // copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE // SOFTWARE. namespace DisCatSharp { /// /// Represents the type of a message. /// public enum MessageType : int { /// /// Indicates a regular message. /// Default = 0, /// /// Message indicating a recipient was added to a group direct message or a thread channel. /// RecipientAdd = 1, /// /// Message indicating a recipient was removed from a group direct message or a thread channel. /// RecipientRemove = 2, /// /// Message indicating a call. /// Call = 3, /// /// Message indicating a group direct message or thread channel rename. /// ChannelNameChange = 4, /// /// Message indicating a group direct message channel icon change. /// ChannelIconChange = 5, /// /// Message indicating a user pinned a message to a channel. /// ChannelPinnedMessage = 6, /// /// Message indicating a guild member joined. Most frequently seen in newer, smaller guilds. /// GuildMemberJoin = 7, /// /// Message indicating a member nitro boosted a guild. /// UserPremiumGuildSubscription = 8, /// /// Message indicating a guild reached tier one of nitro boosts. /// TierOneUserPremiumGuildSubscription = 9, /// /// Message indicating a guild reached tier two of nitro boosts. /// TierTwoUserPremiumGuildSubscription = 10, /// /// Message indicating a guild reached tier three of nitro boosts. /// TierThreeUserPremiumGuildSubscription = 11, /// /// Message indicating a user followed a news channel. /// ChannelFollowAdd = 12, /// /// Message indicating a user is streaming in a guild. /// GuildStream = 13, /// /// Message indicating a guild was removed from guild discovery. /// GuildDiscoveryDisqualified = 14, /// /// Message indicating a guild was re-added to guild discovery. /// GuildDiscoveryRequalified = 15, /// /// Message indicating that a guild has failed to meet guild discovery requirements for a week. /// GuildDiscoveryGracePeriodInitialWarning = 16, /// /// Message indicating that a guild has failed to meet guild discovery requirements for 3 weeks. /// GuildDiscoveryGracePeriodFinalWarning = 17, /// /// Message indicating a thread was created. /// ThreadCreated = 18, /// /// Message indicating a user replied to another user. /// Reply = 19, /// /// Message indicating an slash command was invoked. /// ChatInputCommand = 20, /// /// Message indicating a new was message sent as the first message in threads that are started from an existing message in the parent channel. /// ThreadStarterMessage = 21, /// /// Message reminding you to invite people to help you build the server. /// GuildInviteReminder = 22, /// /// Message indicating an context menu command was invoked. /// ContextMenuCommand = 23, /// /// Message indicating the guilds automod acted. /// AutoModerationAction = 24, + + /// + /// Message indicating that a member purchased a role subscription. + /// + RoleSubscriptionPurchase = 25 } }