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

Commit

Permalink
Get repo ready for archive.
Browse files Browse the repository at this point in the history
  • Loading branch information
navi1995 committed Jul 30, 2023
1 parent 41d3a6d commit 27cf63a
Showing 1 changed file with 10 additions and 19 deletions.
29 changes: 10 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,35 +1,26 @@
# Movie Night Bot for Discord
# Repository is now ARCHIVED!!!
No changes will be made here as I have moved to a Premium model to support the server costs of hosting the bot.


## Movie Night Bot for Discord
This is a Discord Bot written in Node.JS using Discord.JS library to interface with the Discord API.

MongoDB connection is required to store and retrieve settings as well as film details. The schema is available within bot.js

The Movie DB API is used to gather any relevant data to movies throughout the application.

## Setup
### Setup
Create a config.json file in the root directory
```json
{
"prefix": "set to whichever prefix you wish the bot to use.",
"token": "set to your discord bot API token",
"movieDbAPI": "set to your API token from developers.themoviedb.org (Required to get movie data when requested by user)",
"mongoLogin": "set to your connection string for any MongoDB collection (Check Mongoose for more information)"
"mongoLogin": "set to your connection string for any MongoDB collection (Check Mongoose for more information)",
"topggAPI": "Top GG API token, you should remove this.",
"testing": true // Remove or set to true so that stats are not posted.
}
```

I would recommend removing dblapi.js and references to topggAPI/testing from bot.js as this is simply to post statistics to a third party website.

Run index.js which will spawn a sharding manager, which runs bot.js to instantiate all commands and handle responses.

## Commands
List of commands available at https://movienightbot.xyz/commands/

## Approach
General development approach was followed from Discord.js documentation to ensure best practices were implemented in terms of bots. Many settings had to be adjusted to ensure my EC2 servers memory usage wouldn't climb indefinitely with default options.

index.js will simply be spawning a sharding manager, which points to bot.js as the primary file to spawn. This is a required implementation by Discord after a bot has exceeded 2,500 servers.

Command script files are separated into a Command folder, these are then loaded in by Bot.js and handles events/command execution. The default prefix is --

Bot.js will check every message for any alias/command text and if it is present it will continue with checks and execution.

On leaving/kicked from a server, we delete settings and movies from that server
Run index.js which will spawn a sharding manager, which runs bot.js to instantiate all commands and handle responses.

0 comments on commit 27cf63a

Please sign in to comment.