onMessage
gets called with a parameter of type Message
Returned by require "discord-bot"
.
Properties:
user
, User
Properties:
id
, stringusername
, stringbot
, boolflags
, intmfa_enabled
, ?bool, only present for own account (DiscordBot.user)discriminator
, string, "0" for most accounts nowadays
Properties:
id
, stringclient
, DiscordBot
Methods:
addBan(user_id: string, reason: string = "", delete_message_days: number = 0)
leave()
Properties:
id
, stringclient
, DiscordBot
Methods:
sendTyping()
sendMessage(content: string): Message
Properties:
content
, stringauthor
, Userchannel
, Channelchannel_id
, stringguild
, ?Guild, absent for DMsguild_id
, ?string, absent for DMsid
, stringclient
, DiscordBotattachments
, tablecomponents
, tableembeds
, tableflags
, intmention_everyone
, boolmention_roles
, tablementions
, tablenonce
, stringpinned
, booltimestamp
, stringtts
, booltype
, int
Methods:
mentionsMe(): bool
reply(content: string): Message
edit(content: string)
delete()