feat: rework server class#458
Open
Droid00000 wants to merge 1 commit into
Open
Conversation
df22dc2 to
9c2e723
Compare
4ced701 to
246dbf3
Compare
3ab8860 to
6584b20
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR re-works the server class (no breaking changes). Since we're not in a major version, I was really careful to not do any breaking changes (even though the diff looks pretty horrible), but I did mark a few things as
@deprecateddoc-wise since there are now better replacements for them.Added
Emoji#modifyEmoji#deleteServer::SYSTEM_CHANNEL_FLAGSServer#kick!Server#ban!Server#unban!Server#bulk_ban!Server#audit_logServer#create_emojiServer#prune_count!Server#query_membersServer#prune_membersServer#create_channel!Server#join_notifications?Server#boost_notifications?Server#reminder_notifications?Server#join_notification_replies?Server#role_subscription_notifications?Server#role_subscription_notification_replies?request:KWARG forServer#rolestyle:KWARG forServer#widget_urlbypass_cache:KWARG forServer#rolesbypass_cache:KWARG forServer#emojisbypass_cache:KWARG forServer#channelsAmerican color params for
Server#create_roleflags:KWARG forServer#add_member_using_tokenincrementKWARG toServer#cache_membersizeKWARG forServerAttributes#icon_urlsizeKWARG forServer#splash_urlsizeKWARG forServer#banner_urlsizeKWARG forServer#emoji_icon_urlsizeKWARG forServer#discovery_splash_urlsizeargument forAPI#icon_urlsizeargument forAPI#splash_urlsizeargument forAPI#banner_urlsizeargument forAPI#emoji_icon_urlsizeargument forAPI#discovery_splash_urlAPI::Channel#create!API::Server#list_active_threadsAPI::Server#create_role!API::Server#get_server_prune_countAPI::Server#begin_server_pruneAPI::Server#get_audit_logAPI::Server#list_emojisAPI::Server#get_emojiAPI::Server#create_emojiAPI::Server#update_emojiChanged
All channels are now stored internally in a hash per-server, and serialized to an array when the attribute is called.
The name of
Server#add_rolewas changed toServer#cache_roleThe name of
Server#add_channelwas changed toServer#cache_channelThe name of
Server#cache_widget_datawas changed toServer#cache_widgetDeprecated
Server#any_emoji?Server#max_emojiServer#widget_enabled=Server#set_widget_enabledServer#widget_channel=Server#set_widget_channelServer#modify_widgetServer#name=Server#icon=Server#afk_channel=Server#system_channel=Server#afk_timeout=Server#verification_level=Server#default_message_notifications=Server#explicit_content_filter=Server#text_channelsServer#voice_channelsServer#widget_banner_urlServer#create_channelServer#bansServer#add_emojiServer#delete_emojiServer#search_membersServer#edit_emojiServer#begin_pruneServer#prune_countServer#regionServer#region=Server#moveServer#unbanServer#kickServer#banServer#bulk_banVoiceRegion#vipVoiceRegion#sample_portVoiceRegion#sample_hostnameRemoved
Emoji#process_rolesServer#add_memberServer#member_cached?Server#update_emoji_dataFixed
@vanity_url_codewas fixed to@vanity_invite_code