my node.js bot shenanigans
this bot exists for me to learn node.js with. that's pretty much it.
help
- prints help menu
hello
- returns a friendly message
returnid
- returns id of the current channel
say
- repeats a user's message
sayin
- repeats a user's message in a specified channel
sleep
- kills bot (admin only command)
shutup
- disables the automatic replies
speak
- undoes shutup
reload
- pulls changes from GitHub and reloads the commands file on the fly
test
- useless, was used for testing reload
but could come in handy
announce
- pings a given role in a given channel, then immediately makes it unmentionable
edit
- edits announcements
setperm
- sets minimum required role to use permission-restricted commands
eval
- executes javascript code and returns any output to the channel where the command was issued
The following commands are permission-restricted:
announce
edit
setperm
shutup/speak
The following commands are locked to the Admin ID:
sleep
reload
eval
-
announcement
:- Specific Syntax:
{prefix} announce {role name (case sensitive)} #{channel} {message}
- Example:
fluff, announce test role #announcements this is an announcement!
- Returns:
[in specified channel, #announcements]
@test role: this is an announcement!
- Specific Syntax:
-
edit
:- Specific Syntax:
{prefix} edit {announcement ID} #{announcement channel} {new message}
- Example:
[on the announcement above]
fluff, edit 123456789012345678 #annoucements edited message!
- Returns:
[in specified channel, #announcements]
@test role: edited message! (edited)
- Specific Syntax:
-
sayin
: -
setperm
:{prefix} setperm {role name (case sensitive)}
- Example:
fluff, setperm test role
- Returns:
minimum role set
The following commands return a Rich Embed to the channel where the command was issued:
this bot does not include a token or a prefix, but by default I use fluff,
as a prefix.
Here's the format of the config.json
{
"token" : "tokentokentokentoken"
"prefix" : "prefix"
"admin" : "ID of user running the bot"
}
Loe Does Code for helping me understand what the fuck JavaScript was doing.
Aurora's Palace for helping me fix the edit command
eslachance for the example bot which helped shape the bot and get ideas.
@cyber_sec_0 for helping with JavaScript formatting
LetCompleted!sayin
use a normal channel link with something likejake, sayin #general
(basically add ID parsing)- Autodelete certain commands and their calls. [WIP]
Make a role pingable, send a message that pings the role, then undo changes.Completed!- Make commands that allow for user input across multiple messages.