Async::DiscordSourceAsyncDiscordChannel

class Channel

Represents a channel in a guild.

Definitions

def send_message(content)

Send a message to this channel.

Signature

parameter content String

The content of the message.

Implementation

def send_message(content)
	payload = {
		content: content
	}
	
	Message.post(@resource.with(path: "messages"), payload)
end

def id

The unique identifier for this channel.

Implementation

def id
	self.value[:id]
end

def text?

Whether this channel is a text channel.

Signature

returns Boolean

if this channel is a text channel.

Implementation

def text?
	self.value[:type] == 0
end

def voice?

Whether this channel is a voice channel.

Signature

returns Boolean

if this channel is a voice channel.

Implementation

def voice?
	self.value[:type] == 2
end