Class: Discordrb::ActivitySet

Inherits:
Object
  • Object
show all
Includes:
Enumerable
Defined in:
lib/discordrb/data/activity.rb

Overview

A collection of the user's activities.

Instance Method Summary collapse

Instance Method Details

#competingArray<Activity>

Returns all activities of type Discordrb::Activity::COMPETING.

Returns:



267
268
269
# File 'lib/discordrb/data/activity.rb', line 267

def competing
  @activities.select { |act| act.type == Activity::COMPETING }
end

#custom_statusArray<Activity>

Returns all activities of type Discordrb::Activity::CUSTOM.

Returns:



262
263
264
# File 'lib/discordrb/data/activity.rb', line 262

def custom_status
  @activities.select { |act| act.type == Activity::CUSTOM }
end

#gamesArray<Activity>

Returns all activities of type Discordrb::Activity::GAME.

Returns:



242
243
244
# File 'lib/discordrb/data/activity.rb', line 242

def games
  @activities.select { |act| act.type == Activity::GAME }
end

#listeningArray<Activity>

Returns all activities of type Discordrb::Activity::LISTENING.

Returns:



252
253
254
# File 'lib/discordrb/data/activity.rb', line 252

def listening
  @activities.select { |act| act.type == Activity::LISTENING }
end

#streamingArray<Activity>

Returns all activities of type Discordrb::Activity::STREAMING.

Returns:



247
248
249
# File 'lib/discordrb/data/activity.rb', line 247

def streaming
  @activities.select { |act| act.type == Activity::STREAMING }
end

#to_aArray<Activity>

Returns all activities.

Returns:



237
238
239
# File 'lib/discordrb/data/activity.rb', line 237

def to_a
  @activities
end

#watchingArray<Activity>

Returns all activities of type Discordrb::Activity::WATCHING.

Returns:



257
258
259
# File 'lib/discordrb/data/activity.rb', line 257

def watching
  @activities.select { |act| act.type == Activity::WATCHING }
end