1.4.5 • Published 5 months ago

devland.js v1.4.5

Weekly downloads
-
License
Apache 2.0
Repository
github
Last release
5 months ago

Links

Need help ?

If you need help with the module you can take a look to the documentation or come into our discord server.

You found a bug ?

If you found a bug you can just open a issue by explaining this one. You can report it on our discord server too.

Let's start

This is a little part present in our documentation.

const {Client, IntentFlags} = require("devland.js")
const bot = new Client({
    intents: [IntentFlags.FLAGS.GUILDS, IntentFlags.FLAGS.GUILD_MEMBERS, IntentFlags.FLAGS.GUILd_PRESENCES]
    guildsLifeTime: 7200000, 
    // here we ask to the module to cache all guilds during 2h
    // after all events with a guild as target, the life time will be reset to 2h
    connect: true,
    // represent the auto-connect, if true you will need to provid the token here
    token: "YOUR TOKEN" 
    //token is optional if 'connect' is on false, you will be invited to put
    // the token in the next page (Connect Client)
})

bot.on('ready', () => console.log(`${bot.user.tag} connected`))

All cache options available for the client :

guildsLifeTime: milliseconds, //will unlock bot.guilds
channelsLifeTime: milliseconds, //will unlock bot.<type>Channels (ex : bot.textChannels)
usersLifeTime: milliseconds, //will unlock bot.users
messagesLifeTime: milliseconds, //will unlock bot.messages
threadsLifeTime: milliseconds, //will unlock bot.threadChannels
membersLifeTime: milliseconds, //will unlock <guild>.members
rolesLifeTime: milliseconds, //will unlock <guild>.roles
invitesLifeTime: milliseconds, //will unlock <guild>.invites
presencesLifeTime: milliseconds, //will unlock <guild>.presences & <member>.presence
voicesLifeTime: milliseconds, //will unlock <guild>.voicesStates & <member>.voice
enableAllCaches: //will unlock all caches of the client
waitCacheBeforeReady: boolean, //wait for all caches enabled to be completed before emit the ready event, by default set to true
fetchAllMembers: boolean, //by default fetch all members in a guild
checkForUpdate: boolean, //check for a new update when the program is up

// warning, for the members, roles, presences, voices & invites cache the guilds cache must be enabled too

All ws options available for the client :

large_threshold: number,
compress: boolean,
properties: propertiesOptions,

propertiesOptions = {
    $os: string | NodeJS.Platform,
    $browser: string,
    $device: string
}

All presence options available for the client :

status: string, //dnd, online, invisible, idle, offline
afk: boolean,
activities: simpleActivity[],
since: number,

simpleActivity = {
    name: string,
    type: ActivityType,
    url: string,
}

ActivityType = {
    Game = 0,
    Streaming = 1,
    Listening = 2,
    Watching = 3,
    Custom = 4,
    Competing = 5
}

All others options available for the client :

connectionTimeout: number, //how many time before throwing a error if still not connected, default set to 30000 (30s)
maxReconnectAttempts: number, //how attempts to reconnect the gateway after a error, default set to Infinity
maxResumeAttempts: number, //how many attempts to resume the gateway connection after a disconnect, default set to 10
invalidCommandValueReturnNull: boolean, //<interaction>.getCommandValue() must return a null value or undefined if invalid, default set to true (null returned)
1.4.5

5 months ago

1.4.4

5 months ago

1.4.3

5 months ago

1.4.2

5 months ago

1.4.1

5 months ago

1.4.0

5 months ago

1.3.6

5 months ago

1.3.5

5 months ago

1.3.4

5 months ago

1.3.3

5 months ago

1.3.2

6 months ago

1.3.1

6 months ago

1.3.0

6 months ago

1.2.54

10 months ago

1.2.53

11 months ago

1.2.0

1 year ago

1.2.2

1 year ago

1.2.1

1 year ago

1.1.77-dev

1 year ago

1.1.92

1 year ago

1.1.91

1 year ago

1.1.90

1 year ago

1.1.96

1 year ago

1.1.95

1 year ago

1.1.94

1 year ago

1.1.93

1 year ago

1.1.99

1 year ago

1.1.98

1 year ago

1.1.97

1 year ago

1.1.78-dev

1 year ago

1.1.70

1 year ago

1.2.41

1 year ago

1.1.74

1 year ago

1.2.42

1 year ago

1.1.73

1 year ago

1.1.72

1 year ago

1.2.40

1 year ago

1.1.71

1 year ago

1.2.45

1 year ago

1.1.78

1 year ago

1.2.46

1 year ago

1.1.77

1 year ago

1.2.43

1 year ago

1.1.76

1 year ago

1.2.44

1 year ago

1.1.75

1 year ago

1.2.49

1 year ago

1.2.47

1 year ago

1.2.48

1 year ago

1.1.79

1 year ago

1.1.81

1 year ago

1.1.80

1 year ago

1.2.52

1 year ago

1.2.50

1 year ago

1.2.51

1 year ago

1.1.82

1 year ago

1.2.23

1 year ago

1.2.24

1 year ago

1.2.21

1 year ago

1.2.27

1 year ago

1.2.28

1 year ago

1.1.59

1 year ago

1.2.25

1 year ago

1.1.58

1 year ago

1.2.26

1 year ago

1.1.57

1 year ago

1.2.29

1 year ago

1.1.76-dev

1 year ago

1.2.30

1 year ago

1.1.63

1 year ago

1.2.31

1 year ago

1.1.62

1 year ago

1.1.61

1 year ago

1.1.60

1 year ago

1.2.34

1 year ago

1.1.67

1 year ago

1.2.35

1 year ago

1.1.66

1 year ago

1.2.32

1 year ago

1.1.65

1 year ago

1.2.33

1 year ago

1.1.64

1 year ago

1.2.38

1 year ago

1.2.39

1 year ago

1.1.69

1 year ago

1.2.37

1 year ago

1.1.68

1 year ago

1.1.29

1 year ago

1.1.28

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.7

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.1.30

1 year ago

1.1.34

1 year ago

1.1.32

1 year ago

1.1.31

1 year ago

1.1.38

1 year ago

1.0.26

1 year ago

1.1.37

1 year ago

1.0.25

1 year ago

1.1.36

1 year ago

1.0.24

1 year ago

1.1.35

1 year ago

1.1.39

1 year ago

1.1.41

1 year ago

1.1.40

1 year ago

1.1.45

1 year ago

1.1.44

1 year ago

1.1.43

1 year ago

1.1.42

1 year ago

1.1.49

1 year ago

1.1.48

1 year ago

1.1.47

1 year ago

1.1.46

1 year ago

1.1.1

1 year ago

1.1.0

1 year ago

1.1.9

1 year ago

1.1.8

1 year ago

1.1.7

1 year ago

1.1.6

1 year ago

1.1.5

1 year ago

1.1.4

1 year ago

1.1.3

1 year ago

1.1.2

1 year ago

1.1.52

1 year ago

1.1.51

1 year ago

1.1.50

1 year ago

1.1.56

1 year ago

1.1.12

1 year ago

1.1.55

1 year ago

1.1.11

1 year ago

1.1.10

1 year ago

1.1.53

1 year ago

1.1.16

1 year ago

1.1.15

1 year ago

1.1.14

1 year ago

1.1.13

1 year ago

1.1.19

1 year ago

1.1.18

1 year ago

1.1.17

1 year ago

1.1.23

1 year ago

1.1.22

1 year ago

1.1.21

1 year ago

1.1.20

1 year ago

1.1.27

1 year ago

1.1.26

1 year ago

1.1.25

1 year ago

1.1.24

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.22

1 year ago

1.0.21

1 year ago

1.0.23

1 year ago

1.0.0

1 year ago