|
|
Hello so today I will be releasing a very basic discord bot that will allow you to get the basic bot into your server/program and allow you to run commands
1) Download [Only registered and activated users can see links. ] that contains all the basic code and has the following in the code base
- Command Listener
- Removes command after someone sends (Stop chat filling up)
- One example command
- One Lib (JDA-3.5.0_327-withDependencies)
After you have that download and you have added it to your project go to the next step
2) Now you have it in your project you will want to make a bot and a key and set up some basic information about the bot find the DiscordConstants Class and you will see the following
- Prefex - This is what your command is to call the bet I have set it to [::] since that is what is used in steps commands but this can be anything you want
- Program_Name - This does not need explaining really but it's your Server / Program Name
- Discord_Bot_Message - This is the message that shows under your bot name as shown here
- Footer_Icon - This is the icon that will show in the footer of all your messages and it can be a link to any image you like
- Discord_Token - This is very important as it will link you to your discord server I have linked a tutorial on how to get this [Only registered and activated users can see links. ]
Now you have all that setup I will show you the code a little and some idea you can add to your bot
Running the bot:
In DiscordConnection you will see a method called init go to where your server is initialized and call that method
Making a new Command:
if you look inthis is where you will put your commands for an example I have put a simple class called players if you look in the class you will see it implements Command this the the basic structure for the commands and you will see the following methods in itCode:discord.commands.impl.all
- called - If the command has been called
- action - what you want the command to do
- executed - If you need the command to do anything once it's been running eg clean up of some sorts / stop a timer
- description - WHat the command does (I will explain this more soon)
Once you have your new command done you will need to go into DiscordConnection
and look for addCommands under it add
the first parameter is what the user uses to call the command this can be any stringCode:CommandHandler.COMMAND_MAP.put("players", new Players());
the Second parameter is the class name of the command that you want to run
now I have explained all of that and you have a basic understanding of the system here are some things I have done and you may want to look at yourself
- Add permissions to the bot and check if they are correct on the discord bot this is why I packaged my commands as .all
I also have on my server .owner .admin and then them commands can only be run if you meet that rank- I have a description method so if a player does ::help you can send them a pm with all the discord commands and a description
- Music Bot
- Search your wiki
- Get Server stats
- Lookup Players
- Announcements when someone gets a special drop or max etc
- Server Announcements for events
- Link server account to discord so it mentions you instead of just saying your name
You can do a lot.
Before anyone says Easy or whatever bullshit you wish to say I did this so people did not have to buy basic bots when there are lots of tutorials on it and its really simple, if you need any help feel free to post

Thanks going to try this out
Cool, thanks for posting this, it will be fun making some new commands for it![]()


| « [PI] UUID Banning | i tried to change admin crowns on my ruse source it didnt change » |
| Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |