🔩
TouchGuild Docs
NPM
  • 😄Get started
    • 🌟Get started
    • TouchGuild's Guide
  • Older Documentation
    • Select version
      • Newer versions
      • v.0.1.7
        • What's new?
        • 🪑Components
          • 🤖Client
          • ☕Channel
          • 💬Message
          • 🏛️Guild
          • 🙇‍♂️🙇♂ User
          • 👾UserClient
          • 🫂Member
          • ☠️BannedMember
          • 🗓️CalendarEvent
          • 📆CalendarEventRSVP
          • 🗣️ForumTopic
          • 📃ForumTopicComment
          • 📄Doc
          • ↗️ListItem
          • 💭Webhook
        • ⚙️TouchGuild.DevTools
        • 🎒Examples
          • 🦾Snipe & editsnipe
          • 🎰Get bot's information
          • 🤯XP Awards
        • 🌐List of available events
      • v.0.1.6
        • 🏠Home
        • 🪑Components
          • 🤖Client
          • ☕Channel
          • 💬Message
          • 🏛️Guild
          • 🙇‍♂️🙇♂ User
          • 🫂Member
          • ☠️BannedMember
          • 🗓️CalendarEvent
          • 📆CalendarEventRSVP
          • 🗣️ForumTopic
          • 📄Doc
          • ↗️ListItem
          • 💭Webhook
        • 🌐List of available events
        • Types
          • MentionsType
          • ListItemNoteTypes
          • ChannelEditTypes
          • ChannelCategories
          • messageReactionRawTypes
          • messageReactionTypes
          • emojiTypes
          • socialLinkTypes
          • UserClientTypes
  • Misc
    • 😅FAQ
    • 👀Our vision
  • Deprecated Nightly
    • 🎯Features
    • Examples
      • Snipe & editsnipe
Powered by GitBook
On this page
  • Log bot's username when ready.
  • Log every information about the logged bot.
Edit on GitHub
  1. Older Documentation
  2. Select version
  3. v.0.1.7
  4. Examples

Get bot's information

Learn more about your bot's user.

Log bot's username when ready.

client.on('ready', ()=> {
   console.log('Logged as', client.user.username);
});

Log every information about the logged bot.

client.on('ready', ()=> {
   console.log(client.user);
});

Output (example):

UserClient {
  _client: Client,
  id: "AQbXpB84",
  botID: "c06b6d42-05db-4af7-8a28-faae65b53e7a",
  type: "bot",
  username: "touchguild testing bot",
  _createdAt: 1666429419806,
  createdBy: "4kR9QRVA"
}

You can use the information like the one above to do whatever you want with it.

PreviousSnipe & editsnipeNextXP Awards

Last updated 2 years ago

🎒
🎰