$botInGuild
Returns `true` if the bot is in the server of provided guild ID. Otherwise, function returns `false`.

FUNCTION USAGE

  • $botInGuild
  • $botInGuild[]
  • $botInGuild[guildID]

Properties:

  • [] - Leaving blank checks if the bot is in the guild where the command is executed. Same as no brackets.
  • guildID - The ID of the guild to check.

Example 1: Getting the current server. Obviously the bot will return true because the bot should be in that server if you're using it's command lol

1
bot.Command({
2
name: "check",
3
code: `
4
$botIsGuild
5
`
6
})
Copied!

Example 2: Using $message[] and $botInGuild to check if the bot is in the server and enter a guildID on the fly.

1
bot.Command({
2
name: "check",
3
code: `
4
$isGuildVerified[$message[]]
5
$onlyIf[$botInGuild[$message[]]==true;I'm not in that server]
6
`
7
})
Copied!
Last modified 5mo ago
Copy link
Contents
Properties: