module Vox::HTTP::Routes::Invite
Mixin for invite routes.
Public Instance Methods
delete_invite(invite_code, reason: nil)
click to toggle source
Delete an invite by its code. @param invite_code [String] @return [Hash<Symbol, Object>] The deleted [invite](discord.com/developers/docs/resources/invite#invite-object)
object.
@vox.permissions MANAGE_CHANNELS or MANAGE_GUILD @vox.api_docs discord.com/developers/docs/resources/invite#delete-invite
# File lib/vox/http/routes/invite.rb, line 30 def delete_invite(invite_code, reason: nil) route = Route.new(:DELETE, '/invites/%{invite_code}', invite_code: invite_code) request(route, reason: reason) end
get_invite(invite_code, with_counts: :undef)
click to toggle source
Get an invite by its code. @param invite_code [String] @param with_counts [true, false] Whether the invite object should contain approximate member counts. @return [Hash<Symbol, Object>] The [invite](discord.com/developers/docs/resources/invite#invite-object)
object.
@vox.api_docs discord.com/developers/docs/resources/invite#get-invite
# File lib/vox/http/routes/invite.rb, line 19 def get_invite(invite_code, with_counts: :undef) route = Route.new(:GET, '/invites/%{invite_code}', invite_code: invite_code) request(route, query: filter_undef({ with_counts: with_counts })) end