Skip to content

Changing role permissions #115

Answered by swarley
DannyBen asked this question in Q&A
Jan 8, 2022 · 2 comments · 7 replies
Discussion options

You must be logged in to vote

For answer purposes see #115 (reply in thread)

I found out how to do it - not sure it is the shortest way, but it seems to be working ok.

bot.command(:lock) do |event|
  break unless event.user.id == user_id
  member = event.server.roles.find { |a| a.name == 'Member' }
  member.permissions.can_send_messages = false
end

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
7 replies
@swarley
Comment options

@DannyBen
Comment options

@DannyBen
Comment options

@swarley
Comment options

@DannyBen
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by swarley
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants