DiscordUtils

Utility functions to do common Discord tasks.

Methods

# (async, inner) channelMsg(channel, userId, msgText) → {Promise.<Message>}

Sends a message to a user via a channel. The user is mentioned.
Parameters:
Name Type Description
channel TextChannel
userId String
msgText String
Returns:
Type
Promise.<Message>

# (async, inner) channelMsgDelete(channel, userId, msgText, time)

Sends a message to a user via a channel. Message is removed after a time out.
Parameters:
Name Type Description
channel TextChannel
userId String
msgText String
time Number time to wait to delete message, in seconds

# (async, inner) channelMsgWaitDelete(channel, userId, msgText, waitTimeopt)

Sends a message to a user via a channel, waits for some time, then deletes the message.
Parameters:
Name Type Attributes Default Description
channel TextChannel
userId String
msgText String
waitTime Number <optional>
3 amount of time to wait in seconds