-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a3db9b1
commit 7ad15b8
Showing
13 changed files
with
76 additions
and
77 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,13 @@ | ||
FROM ruby:3.3-alpine | ||
|
||
RUN apk update && \ | ||
apk add --no-cache postgresql-dev ruby-json git build-base libsodium ffmpeg | ||
apk add --no-cache postgresql-dev ruby-json git build-base libsodium-dev ffmpeg | ||
|
||
WORKDIR /app | ||
|
||
COPY . . | ||
|
||
RUN gem install bundler --source https://rubygems.org && \ | ||
gem install racc && \ | ||
bundle install | ||
bundle install | ||
|
||
CMD ["bundle", "exec", "ruby", "--yjit", "core.rb"] | ||
CMD ["bundle", "exec", "ruby", "core.rb"] |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'discordrb' | ||
require 'constants' | ||
|
||
def button_click(data, button) | ||
unless data.bot.profile.on(data.server).permission?(:manage_emojis) | ||
data.update_message(content: RESPONSE[61]) | ||
return | ||
end | ||
|
||
if data.server.emoji_limit?(data.get_component(button).emoji) | ||
data.update_message(content: RESPONSE[58], ephemeral: true) | ||
return | ||
end | ||
|
||
data.update_message do |builder, components| | ||
components.row do |buttons| | ||
data.message.to_message.buttons.each do |old_button| | ||
buttons.button(style: old_button.custom_id == button ? 4 : old_button.style, | ||
emoji: old_button.emoji.id, custom_id: old_button.custom_id) | ||
end | ||
end | ||
|
||
builder.add_embed do |embed| | ||
embed.title = EMBED[28] | ||
embed.color = UI[5] | ||
end | ||
end | ||
|
||
emoji = data.server.add_emoji(data.get_component(button).emoji.name, | ||
data.get_component(button).emoji.file) | ||
|
||
data.send_message(content: "#{RESPONSE[56]} #{emoji.mention}", ephemeral: true) | ||
end |
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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