DB-Script
Discord Server
NPM
Search…
DB-Script
Getting Started
NPM Updates
Known Bugs
Functionalities
Bot Functions
Events
BanCommand
BotJoinCommand
BotLeaveCommand
ChannelCreateCommand
ChannelDeleteCommand
ChannelUpdateCommand
EmojiCreateCommand
EmojiDeleteCommand
GuildUpdateCommand
JoinedCommand
LeaveCommand
LoopCommand
MessageDeleteCommand
MessageEditEvent
RateLimitCommand
ReadyCommand
ReactionAddCommand
ReactionRemoveCommand
RoleCreateCommand
RoleDeleteCommand
UnbanCommand
UserUpdateCommand
Functions
Guides
Other
Contributors
Discord Server
FAQs
Staff
Powered By
GitBook
BotJoinCommand
Triggers when the bot joins a server. Great for bot join logs!
​
Example 1: The event placed in the main file.
1
bot.BotJoinCommand({
2
name: "$getServerVar[channel]",
3
code: `
4
Thanks for inviting me!
5
My prefix is $getServerVar[prefix]
6
My help page is $getServerVar[prefix]help
7
You can also ping me for my help page!
8
`
9
})
10
bot.onBotJoin()
Copied!
​
Example 2: The event placed in the
event handler
(its own file)
bot.onBotJoin()
- Goes in the main file to be able to call the event!
1
module.exports.BotJoinCommand = ({
2
name: "$systemChannelID",
3
code: `
4
Thanks for inviting me!
5
My prefix is $getServerVar[prefix]
6
My help page is $getServerVar[prefix]help
7
You can also ping me for my help page!
8
`
9
})
Copied!
Previous
BanCommand
Next
BotLeaveCommand
Last modified
11mo ago
Copy link
Contents