This is a simple Discord selfbot written in Lua This is the rewrite of my original egobot, I decided to restart from scratch to:
- Remove its dependency to sqlite3
- Have a better control over modules
- Make everything be module, from aliases to config interface
You will need to get luvit and lit to run Egobot, recommended platform: Linux
Clone this repo
git clone git@github.com:LazyShpee/discord-egobot.git && cd discord-egobot
Let lit install it's dependencies
lit install
To run Egobot, you will need to get your Discord token (google is your friend, methods may vary)
luvit egobot.lua --token DISCORD_TOKEN
If you wish to run egobot without parameters (in other words, without putting your token everytime), you can modify the default token by doing
luvit egobot.lua -T DISCORD_TOKEN
From now on, you can just run
luvit egobot.lua
And it will use the last saved token, use --help
for more command line arguments and options
Examples will be using the default prefix //
//s <text>
- deletes the command message and replies for formatted text//e <text>
- edits the command message and changes it to formatted text
Text can plain text with a combination of one or more curly braces operations formatted as follow:
{operation_name text}
If operation_name
is known by the formatter it will replace the curly braces operation by formatted text as follow:
ae
- converts ascii characters to fullwidthsb
- retarded spongebob talksp
- adds spaces in between each characters (including spaces)ro
- randomly shuffles the wordscw
- Capitalize The First Letter Of Each Wordlo
- puts the text in lowercaseup
- PUTS THE TEXT IN UPPERCASEmd5
- produces a md5 hashtxt
- outputs the content of a filerl
- outputs a random line from a file
They can be combined with +
and are treated from left to right.
Say (//s
) has additional operations, root is the user
folder, those cannot be combined:
file
- attaches a file from url or path providedrf
andrfr
- attaches a random file from path,rfr
includes subfoldersnodelete
- takes no arguments, prevent the command message deletionrlu
- takes a random line from a file and uploads it as afile
would
Example:
//s {sb+ae Retarded spongebob aesthetics} normal text {cw sofa trigger machine}
//alias <action> [alias] [value]
Actions are one of:
set <alias> <value>
- creates or changes an aliasdelete <alias>
- deletes an aliasparams <alias> [inline|before|after]
- sets if arguments are passed on,inline
replaces%s
by the argumentsave
- saves aliases to local storagelist
- Lists aliasesshow <alias>
- shows an alias value and its configuration
Eval some lua code in the bot's env - //eval lua code
.
Additional variables:
client
- the bot's objectmessage
- command message objectchannel
- channel object of command messageguild
- guild object of command message
//info
- display a small embed with info about my creation, don't hesitate to share (^-^)b
//test
- just replies withNice test module bro :>
To be done in a near future/upcomming commits
- Rewrite aliases
To be done some other time
- Web UI for config and administering
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details