From 6270535b6e483c14dee2b75c8c865402ebd6c317 Mon Sep 17 00:00:00 2001 From: Droid000 Date: Thu, 5 Sep 2024 22:16:26 -0400 Subject: [PATCH] Deprecate old user login. --- lib/discordrb/api.rb | 24 ------------------------ lib/discordrb/data/overwrite.rb | 2 ++ lib/discordrb/permissions.rb | 2 ++ 3 files changed, 4 insertions(+), 24 deletions(-) diff --git a/lib/discordrb/api.rb b/lib/discordrb/api.rb index 1e8b0f993..13248c077 100644 --- a/lib/discordrb/api.rb +++ b/lib/discordrb/api.rb @@ -231,30 +231,6 @@ def role_icon_url(role_id, icon_hash, format = 'webp') "#{cdn_url}/role-icons/#{role_id}/#{icon_hash}.#{format}" end - # Login to the server - def login(email, password) - request( - :auth_login, - nil, - :post, - "#{api_base}/auth/login", - email: email, - password: password - ) - end - - # Logout from the server - def logout(token) - request( - :auth_logout, - nil, - :post, - "#{api_base}/auth/logout", - nil, - Authorization: token - ) - end - # Create an OAuth application def create_oauth_application(token, name, redirect_uris) request( diff --git a/lib/discordrb/data/overwrite.rb b/lib/discordrb/data/overwrite.rb index 8a103459c..0c7e9e181 100644 --- a/lib/discordrb/data/overwrite.rb +++ b/lib/discordrb/data/overwrite.rb @@ -65,7 +65,9 @@ def initialize(object = nil, type: nil, allow: 0, deny: 0) # Comparison by attributes [:id, :type, :allow, :deny] def ==(other) + # rubocop:disable Lint/Void false unless other.is_a? Discordrb::Overwrite + # rubocop:enable Lint/Void id == other.id && type == other.type && allow == other.allow && diff --git a/lib/discordrb/permissions.rb b/lib/discordrb/permissions.rb index b9194bde7..10d436bed 100644 --- a/lib/discordrb/permissions.rb +++ b/lib/discordrb/permissions.rb @@ -136,7 +136,9 @@ def defined_permissions # Comparison based on permission bits def ==(other) + # rubocop:disable Lint/Void false unless other.is_a? Discordrb::Permissions + # rubocop:enable Lint/Void bits == other.bits end end