+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
-- RECONTINUED --
THIS PROJECT IS WORK IN PROGRESS AND NOT CURRENTLY USABLE
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
CMD-R is a discord management, scheduling and logging bot.
- Clone the git repository using the command
git clone https://github.com/Stefan0436/CMD-R.git
- Enter the cloned repo by running
cd CMD-R
- Mark
configure
as executable by runningchmod +x ./configure
- Configure the project and download C# dependencies by running
./configure
- Build the project by running
make
- Run the bot inside the build folder by running
make run
- Install the bot to your system by running
make install
so you can run it withcmd-r
Coming soon.
- Head over to https://discord.com/developers/applications/
- Click New Application
- Give the application a name (preffered you name it something like
CMD-R fork of <your name here>
) - Then, click on
Bot
in the settings menu (the left side of the page) - Next, click
Add Bot
- I know it says
Reveal token
but we are not there yet, scroll down until you see the settings categoryBot Permissions
and select the required permissions (see the bottom of this page) - Scroll all the way down and copy the number in
Permissions Integer
and save it in a text file named bot info which can be saved anywhere you like, but it is an important file, because it will hold your bots information for later in the guides. (line example: Perm Int: <integer>) - Scroll back up and click the link
Click to Reveal Token
and copy the token to the text file (line example: Token: <token>) - Next, go to the tab
OAuth
in the settings menu (the left side of the page), look forCLIENT ID
and copy it to the text file (line example: ID: <client id>) - Then copy the following url to the text file:
https://discord.com/api/oauth2/authorize?client_id=<client id>&permissions=<perm int>&scope=bot
(save it twice, so that you can change it later using the template, in one of them, change the id and the perm integer, remove the '<' and the '>', example line: URL-1/2: <url>) - Use the url you just created to add the bot to servers (copy it and open it in your browser, see 'Guide to create a discord server' for creating a server)
- Optional: Add a profile icon to the bot in the
Bot
page in the settings menu (the left side of the page) - Optional: Add the profile icon as a app icon in the
General Information
page in the settings menu (the left side of the page)
- Open discord (or the browser version:
https://discord.com/app
) - Click on the '+' in the menu bar on the right side of the app/page. (2nd/3rd option from the bottom)
- Click
Create My Own
- Enter a server name
- Optional: Upload a server icon
- Click
Create
- Start the bot (usually
make run
butcmd-r
if you installed the bot to your system) - Enter the bot token you saved in the text file
- Open the url you saved in the text file in a browser, and add the bot to a server. (incomplete guide, todo, add the rest of the guide)
My bot crashes on startup: 'Discord.Net.HttpException: The server responded with error 401: 401: Unauthorized'
It looks like you entered a invalid token, delete the token config by running the following:
- (Installed to system):
rm -r /usr/lib/cmd-r/Bot.cfg
- (Locally in cloned repo):
rm -r ./build/Bot.cfg
- Start your bot and enter your token again (from the info text file)
Coming soon
Updating is very easy, just run update-cmdr
to download and install the latest version, but make sure the bot is completely shut down, the updater relies on complete bot file access or it will crash.
.
Alternatively, do the compiling guide again, which overwrites the current installation.
Tip: update-cmdr --run
updates and runs at the same time.
Sadly, you cannot uninstall the bot without cloning the repo again, to simplify the process, here are the commands to uninstall the bot:
git clone https://github.com/Stefan0436/CMD-R.git
cd CMD-R
chmod +x ./configure
./configure
make
make uninstall
If you need to re-configure the locally cloned repo, run: ./configure --newrepoconfig
If you are trying to create a direct install script (for example, to add the bot to a package manager), these are the commands you need:
git clone https://github.com/Stefan0436/CMD-R.git
cd CMD-R
chmod +x ./configure
./configure --norepoconfig
make
make install-no-requests
If you are trying to create a direct uninstall script (for example, to add the bot to a package manager), these are the commands you need to uninstall it:
git clone https://github.com/Stefan0436/CMD-R.git
cd CMD-R
chmod +x ./configure
./configure --norepoconfig
make
make uninstall-no-requests
I am a collaborator and i get the following error: fatal: 'repo' does not appear to be a git repository
You seem to be missing the destination repository, to fix this, run the following command in your locally cloned repo:
git remote add repo <your repo url>
(replace '<your repo url>'
with an upstream url, we prefer you fork the repo and enter your fork's url)
To do this, you only need to run a command, you can choose between the following:
- Save in plain text file (less safe, anyone can read your password once they are logged in):
git config --global credential.helper 'store'
- Save in cache (safer, but loses credentials on restart):
git config --global credential.helper 'cache'
Administrator (temporary, specific perms are coming soon!)