Class: LibDiscord::AutoModeration
Overview
Instance Method Summary
collapse
Methods inherited from Resource
#initialize
Instance Method Details
#create_auto_moderation_rule(guild_id:, json:) ⇒ Response
64
65
66
|
# File 'lib/lib_discord/auto_moderation.rb', line 64
def create_auto_moderation_rule(guild_id:, json:)
send_request(:post, "/guilds/#{guild_id}/auto-moderation/rules", json:)
end
|
#delete_auto_moderation_rule(guild_id:, auto_moderation_rule_id:) ⇒ Response
102
103
104
|
# File 'lib/lib_discord/auto_moderation.rb', line 102
def delete_auto_moderation_rule(guild_id:, auto_moderation_rule_id:)
send_request(:delete, "/guilds/#{guild_id}/auto-moderation/rules/#{auto_moderation_rule_id}")
end
|
#get_auto_moderation_rule(guild_id:, auto_moderation_rule_id:) ⇒ Response
47
48
49
|
# File 'lib/lib_discord/auto_moderation.rb', line 47
def get_auto_moderation_rule(guild_id:, auto_moderation_rule_id:)
send_request(:get, "/guilds/#{guild_id}/auto-moderation/rules/#{auto_moderation_rule_id}")
end
|
#list_auto_moderation_rules_for_guild(guild_id:) ⇒ Response
29
30
31
|
# File 'lib/lib_discord/auto_moderation.rb', line 29
def list_auto_moderation_rules_for_guild(guild_id:)
send_request(:get, "/guilds/#{guild_id}/auto-moderation/rules")
end
|
#modify_auto_moderation_rule(guild_id:, auto_moderation_rule_id:, json:) ⇒ Response
84
85
86
|
# File 'lib/lib_discord/auto_moderation.rb', line 84
def modify_auto_moderation_rule(guild_id:, auto_moderation_rule_id:, json:)
send_request(:patch, "/guilds/#{guild_id}/auto-moderation/rules/#{auto_moderation_rule_id}", json:)
end
|