discord.lib
0.6.7
0.6.7
  • discord.lib Official Documentation
  • Credits
  • package
  • Packages
  • Premium Info
  • classes
    • message
    • login
    • joinMessage
    • Complete Examples
    • leaveMessage
    • serverGreeting
    • Attachments
    • sharding
    • Typings
    • exampleBot
    • kick
    • ban
    • webhookClient
    • musicClient
  • Interacting with discord.lib's client
    • client
    • bot activities
    • Do servercount in commands
    • Discord
  • guides
    • MusicClient Guide
  • Deprecated
    • userClient
    • Webhook
    • embed
Powered by GitBook
On this page

Was this helpful?

  1. Interacting with discord.lib's client

bot activities

A powerful discord bot making library to help you make discord bots. Super easy, 100 percent discord api coverage, and more! Discord.lib also allows you to interact with discord.js.

You could use the dl.login way to set regular games, but you cannot do server count there. The client way is the only way to do that. And this tutorial is to show you how.

You need to make sure that only the token is in dl.login function.

First, we need to interact with discord.lib client by doing:

const dl = require("discord.lib")
dl.client.on("ready", () => {
 dl.client.user.setActivity(`I am serving ${client.users.size}`)
})

PreviousclientNextDo servercount in commands

Last updated 5 years ago

Was this helpful?