💾
FloppyJS
  • Introduction
  • Frequently Asked Questions
  • Resources
    • SlashCommand
    • SlashCommandManager
    • WebsocketManager
    • Thread
    • Bot
    • Message
    • Channel
    • Guild
  • Guide
    • Starting off
  • Changelog
Powered by GitBook
On this page
  • Constructor
  • Methods
  • Bot#start(token)
  • Bot#setStatus(type, name, status)
  • Properties
  • Events

Was this helpful?

  1. Resources

Bot

alias Client, Gateway

Constructor

const bot = new Floppy.Bot(token, intents);

Parameter

Type

token?

string?

intents?

number?

Methods

Bot#start(token)

bot.start(token);

Parameter

Type

token?

string?

Bot#setStatus(type, name, status)

bot.setStatus(type, name, status);

Parameter

Type

type

name

string

status

Activity Type

Both fields can be used in methods

Number

Title

0

playing

2

listening

3

watching

Status type

Only Title field can be used in methods

Title

Description

online

Default online status (green icon)

idle

Idle status (moon icon)

dnd

Do Not Disturb (red icon)

offline

Invisible (grey icon)

Properties

Name

Type

Description

guilds

array of Guild objects

The guilds the bot is in

intents

number

The selected intents

connected

boolean

Gateway connection status

v

number

Discord API Version

user

User object

The bot User data

session_id

string

The Gateway session ID

shard?

array

The number of connection shards

application

Application object (partial)

The bot Application data

Events

The READY gateway event. Sent when gateway connection is initiated.

Returns a Ready payload:

Property

Type

Description

v

number

Discord API version

user

User object

The bot User data

session_id

string

The Gateway session ID

shard?

array

The number of connection shards

application

Application object (partial)

The bot Application data

The GUILD_CREATE Gateway event. Sent when Guilds become available to the Client, or when the client joins a Guild.

The MESSAGE_CREATE gateway event. Sent when a new message is created.

PreviousThreadNextMessage

Last updated 3 years ago

Was this helpful?

Returns a .

Returns a .

Guild object
Message object
activity type
status type