Class: WeebSh::ReputationSettings
- Inherits:
-
Object
- Object
- WeebSh::ReputationSettings
- Includes:
- IDObject
- Defined in:
- lib/weeb/data.rb
Overview
Represents a reputation settings object for shimakaze
Instance Attribute Summary collapse
-
#account ⇒ String?
The ID of the account from the token.
-
#max_reputation ⇒ Integer
(also: #max_rep)
The maximum reputation a user may receive.
-
#max_reputation_per_day ⇒ Integer
(also: #max_rep_per_day)
The maximum reputation a user may receive per day.
-
#reputation_cooldown ⇒ Integer
(also: #rep_cooldown)
The cooldown per reputation, this is set to time in seconds.
-
#reputation_per_day ⇒ Integer
(also: #rep_per_day)
The number of reputations a user may give out per cooldown.
Attributes included from IDObject
Instance Method Summary collapse
-
#save ⇒ ReputationSettings
Save the settings on this object.
Methods included from IDObject
Instance Attribute Details
#account ⇒ String?
Returns the ID of the account from the token.
305 306 307 |
# File 'lib/weeb/data.rb', line 305 def account @account end |
#max_reputation ⇒ Integer Also known as: max_rep
Returns the maximum reputation a user may receive.
293 294 295 |
# File 'lib/weeb/data.rb', line 293 def max_reputation @max_reputation end |
#max_reputation_per_day ⇒ Integer Also known as: max_rep_per_day
Returns the maximum reputation a user may receive per day.
297 298 299 |
# File 'lib/weeb/data.rb', line 297 def max_reputation_per_day @max_reputation_per_day end |
#reputation_cooldown ⇒ Integer Also known as: rep_cooldown
Returns the cooldown per reputation, this is set to time in seconds.
301 302 303 |
# File 'lib/weeb/data.rb', line 301 def reputation_cooldown @reputation_cooldown end |
#reputation_per_day ⇒ Integer Also known as: rep_per_day
Returns the number of reputations a user may give out per cooldown.
289 290 291 |
# File 'lib/weeb/data.rb', line 289 def reputation_per_day @reputation_per_day end |
Instance Method Details
#save ⇒ ReputationSettings
Save the settings on this object
319 320 321 322 323 324 325 326 327 |
# File 'lib/weeb/data.rb', line 319 def save WeebSh::API::Shimakaze.set_settings(@interface, { reputationPerDay: @reputation_per_day, maximumReputation: @max_reputation, maximumReputationReceivedDay: @max_reputation_per_day, reputationCooldown: @reputation_cooldown }) self end |