Skip to content

Commit

Permalink
Fix donators and owners removing
Browse files Browse the repository at this point in the history
  • Loading branch information
Erisa committed Feb 24, 2020
1 parent 0f0f6e4 commit 01e863d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion modules/misc/donators.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ module Misc
event.respond("#{YuukiBot.config['emoji_error']} User is not a donator!")
next
end
REDIS.set('donators', donators.delete(id).to_json)
REDIS.set('donators', (donators - [user.id]).to_json)
event.respond("#{YuukiBot.config['emoji_tickbox']} removed `#{event.bot.user(id).nil? ? "Unknown User (ID: #{id})" : "#{event.bot.user(id).distinct}"}` from donators!")
else
if YuukiBot.config['show_donate_urls']
Expand Down
4 changes: 2 additions & 2 deletions modules/owner/owners.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ module Owner
when 'remove'
if YuukiBot.config['master_owner'] == user.id
event.respond("#{YuukiBot.config['emoji_error']} You can't remove the main owner!")
elsif owners.include?(user.id)
REDIS.set('owners', Helper.owners.delete(user.id).to_json)
elsif Helper.owners.include?(user.id)
REDIS.set('owners', (Helper.owners - [user.id]).to_json)
event.respond("#{YuukiBot.config['emoji_tickbox']} removed `#{Helper.userid_to_string(user.id)}` from bot owners!")
else
event.respond("#{YuukiBot.config['emoji_error']} User is not an owner!")
Expand Down

0 comments on commit 01e863d

Please sign in to comment.