Skip to content
This repository has been archived by the owner on Oct 8, 2023. It is now read-only.

A fully configurable and customizable discord bot for any type of server written from scratch in the JavaScript programming language with just a few dependencies. A solid and reliable alternative to creating a discord bot yourself, without having to spend a lot of time filling in the configuration file. Made with love from our organization in Sp…

License

h3nry-d1az/sarah

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Our websitesarah project's website

Welcome to the main website of the sarah project, a highly reliable, easily configurable, and extremely lightweight discord bot written from scratch in the JavaScript programming language with just a few dependencies. The sarah project is completely open source, so feel free to make any changes, report any bugs or strange behaviors, and make suggestions about what you would like to see implemented in the future in this project. Also, if you want to help us indirectly, you can always give this repository a star and share it with your friends, that would help us a lot.



installation

In the following steps we will guide you through the (very simple) process to successfully install and configure the sarah bot on your favorite discord server.
  1. Forking and installation
  2. Configuration
  3. Bot deployment
  4. Adding more commands

Forking and installation

To install sarah on your favorite discord server, you will first have to fork this repository, a simple task that can be done by clicking on the fork button of this repository, as shown in the image below:
Then, wait a bit until the forking process has finished and thus, you have created your own branch of this bot. Now, you can give the repository the name you want and we can continue with the next step.

Configuration

After having created your own fork of the sarah bot, it's time to configure it to adapt it to the needs of your own server, in general, we would like to tell you that you can do this by editing the file sarah/settings/settings.json, however, you are probably looking for one more rigorous and specific documentation on what each of the sections is for, if this is what you want, you should take a look at the documentation page of the settings.json module.

Bot deployment

And finally you will only have to mount your deployment workflow on your sarah fork (this can be done using platforms like Heroku or Netlify) and your discord bot should be successfully deployed, so you should see an environment like the one below in your repository:

Adding more commands

Also, you probably want to add more commands to your bot than sarah has, this is a simple task, but one that you can do manually or using the CLI that sarah includes:
Adding commands manually
  1. Firstly, you need to create its own JavaScript module in the ./sarah/commands/ directory, which must be called [command].js.
  2. Then, write the command program within its main function, which must be called [command]cmd and must recieve five arguments: message, args, client, _, __ (the last two arguments are useless, but your function must recieve them; otherwise it will generate an error).
  3. And finally go to the commands section of the settings.json module and add your command there as an object with the following properties:
  • name: string
  • desc: string
  • path: string
  • admin: bool
  • state: 0 or 1
  • log: bool
  • logicon: string
  • logmsg: string
  • logcolor: string
  • ondev: bool

Adding commands using sarah's CLI
  1. First of all, you will have to make sure that the dependencies of the project are installed, if they are not, you can solve the problem by executing the $ npm i command
  2. Then, you will have to obtain the name of the user who created the project and the name of the repository of the command to install, this obviously on the GitHub platform, from where the command will be obtained.
  3. And finally execute the command node ./addcmd.js [user] [repo] replacing [user] with the user in question and [repo] with the name of the repository, you can see an example below:

If you followed the steps correctly either way, you should have your command ready to run on your server.



commands

The sarah bot comes by default with a wide variety of useful commands for your server, which we are detailed below. With this purpose in mind, we would like to detail the notation used below:
  • s! will be the default prefix in this notation.
  • s!command [param] means this command requires a parameter.
  • s!command (param) means this command supports an optional parameter.
  • 👮 s!command means this command can only be run by administrators
With this notation already detailed, let's go with the commands:
  • 👮 s!ban [user]: When you insert a tag after the command, you ban the pinged user.
  • 👮 s!kick [user]: When you insert a tag after the command, you kick the pinged user.
  • 👮 s!cls [number]: If you write a number between 1-250 after typing this command, you delete that number of msgs.
  • 👮 s!lock (channel): If you type this command on a channel, that channel gets locked.
  • 👮 s!unlock (channel): If you type this command on a channel, that channel gets unlocked.
  • 👮 s!warn [user]: When you insert a tag after the command, you warn the pinged user.
  • 👮 s!unwarn [user]: When you insert a tag after the command, you unwarn the pinged user.
  • 👮 s!warns (user): The bot sends an embed with the warndes users in every server it is.
  • 👮 s!wjson : The bot sends a JSON object with the warned users in every server it is.
  • 👮 s!setwarns [file]: Given an attached JSON file, the server warnings will be replaced by the given in that file.
  • 👮 s!shutdown: Just shutdown the bot until the turnon command is called.
  • 👮 s!turnon: Turns on the bot again.
  • 👮 s!settings: The bot sends you an embed with this bot's settings.
  • s!ping: Simply replies with pong.
  • s!help: This command shows you sarah's commands.
  • s!pf [user]: If you ping a user before the command, you see his/her profile photo.
  • s!cmds: You're actually using this command.
  • s!bans: The bot sends a list with all the banned users.
  • s!ascii [text]: The bot sends a beauty text.
  • s!meme: Sends a random meme.
  • s!userinfo [user]: The bot sends an embed with the user's properties.
  • s!srvinfo: The bot sends an embed with the server's properties.
  • s!rand (number) (number): The bot sends a random number between a given interval.
  • s!dice: The bot sends a random number from 0 to 6.
  • s!develop: The bot sends an embed with the commands wich are on development.
  • s!emojis: The bot sends an embed with all of this server's exclusive emojis.
  • s!ytsearch (text): Searches YouTube for a video related to the given query.


license

Copyright (c) 2022 dotted software

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


About

A fully configurable and customizable discord bot for any type of server written from scratch in the JavaScript programming language with just a few dependencies. A solid and reliable alternative to creating a discord bot yourself, without having to spend a lot of time filling in the configuration file. Made with love from our organization in Sp…

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published