Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IMessage

Hierarchy

  • IMessage

Index

Properties

_message

_message: any

Methods

delete

  • Deletes the message.

    Returns Promise<IMessage | Error>

    The deleted message or an error message if the deletion was not possible

getAuthor

  • Get the author of the message

    Returns IUser

    The author of the message

getAuthorRoles

  • getAuthorRoles(): IRole[]
  • Get the roles of the author

    Returns IRole[]

    The roles of the author

getContent

  • getContent(excludeFirstWord?: boolean): string
  • Get the content of the message.

    Parameters

    • Optional excludeFirstWord: boolean

    Returns string

    The message content

getContentArray

  • getContentArray(excludeFirstWord?: boolean): string[]
  • Get the content of the message as an array.

    Parameters

    • Optional excludeFirstWord: boolean

    Returns string[]

    The message split into an array

getCreationDate

  • getCreationDate(): Date
  • The date on which the message was created at.

    Returns Date

    The date the message was created at

getRegexGroups

  • getRegexGroups(regexPattern: RegExp, excludeFirstWord?: boolean): string[]
  • Get the regex groups of a message

    Parameters

    • regexPattern: RegExp

      The pattern which shall be applied on the message.

    • Optional excludeFirstWord: boolean

    Returns string[]

getServer

  • Get the server the message was sent on, not every message has was sent on a server.

    Returns IServer

    The server the message was sent on

getTextChannel

hasServer

  • hasServer(): boolean
  • Checks whether the message was sent on a server

    Returns boolean

    True if the message was sent on a server, else false

isDeletable

  • isDeletable(): boolean
  • Check if the message is deletable by the user.

    Returns boolean

    True if the message is deletable

isMentioned

  • isMentioned(User: IUser): boolean
  • Check if a user was mentioned within the message.

    Parameters

    • User: IUser

      The user to check for mentions

    Returns boolean

    True if the user was mentioned, else false

Generated using TypeDoc