-
Notifications
You must be signed in to change notification settings - Fork 100
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: application emojis #282
base: main
Are you sure you want to change the base?
Conversation
Should it not be Also, maybe support for gif and png image uploads (by file name extension) could be useful |
Looks like this logic was pulled from the standard emoji flow which does this poorly. We do already have a MIME type gem which is used for role icons mime_type = MIME::Types.type_for(icon.__send__(path_method)).first&.to_s || 'image/jpeg' |
I will update the emoji flow to use MIME types. |
I have pushed a commit to make the |
For documentation purposes, if you need to resize before uploading: ImageWrapper = Struct.new(:blob, :original_filename_value) do
def read
blob
end
def original_filename
original_filename_value
end
end image = MiniMagick::Image.open(file_path)
image.resize('256x256')
image_wrapper = ImageWrapper.new(image.to_blob, file_path)
emoji = @bot.create_application_emoji(emoji_name, image_wrapper) |
Is this a request for an addition to the docs or is this comment meant to serve as the documentation itself. |
I needed to brain-dump this somewhere for future-self. You could add it to the docs or throw it in an example perhaps? |
Ah, alright, that's cool by me. I won't be adding this to the docs or making an example out of it, though. It would be better to just point people to your comment, imo. |
… user account functionality.
Summary
Add support for CRUD operations on application emojis via the REST API, among a few other things.
Added
API calls for application emojis.
API::Application.list_application_emojis
API::Application.get_application_emoji
API::Application.create_application_emoji
API::Application.edit_application_emoji
API::Application.delete_application_emoji
Abstractions for application emojis.
Bot#application_emojis
Bot#get_application_emoji
Bot#create_application_emoji
Bot#edit_application_emoji
Bot#delete_application_emoji
New emoji object fields.
Emoji#user
Emoji#managed
Emoji#available
Emoji#require_colons
icon:
parameter forServer#create_role
Discordrb#encode_file
Helper method to base64 encode a file.intents = [intents] unless intents.is_a? Array
in calculate intents.User#banner=
Method to set the banner and corresponding methods.Removed
Removal of all user account methods.
API::login
API::logout
API::validate_token
Gateway::VOICE_PING
API::acknowledge_message
User#change_status_setting
Fixed
Fixed a bug where parsed emojis would provide the wrong value for
animated
.Fixed the route for
API::User.change_own_nickname
./members/@me/nick
has been deprecated in favor of/members/@me
.Make
Channel#bulk_delete
return immediately if there aren't enough messages to delete.