Hey I made a new discord bot the other day and i thought ill release my old one.
1 - Getting a token : First you will need to get a discord token you can do this by reading the instructions here
https://github.com/Chikachi/DiscordI...ID-for-Discord
IMPORTANT: Now for the code please remember this is all in kotlin and is made for rsmod but you can edit for java very easy and to any other base
2- next you need to add all these classes:
3 - make a new package called managers and add in the following:
4 - make a new package called utils and add in the following:
5 - make a new package called commands and add in the following:
5 - Inside commands make a package called impl and add the following sample classes:
Remember this is just a base with a few commands here are some things to Improve:
If i get enough requests i will convert to java but its easy enough :)
Thanks.
1 - Getting a token : First you will need to get a discord token you can do this by reading the instructions here
https://github.com/Chikachi/DiscordI...ID-for-Discord
IMPORTANT: Now for the code please remember this is all in kotlin and is made for rsmod but you can edit for java very easy and to any other base
2- next you need to add all these classes:
Spoiler for Bot.kt:
Spoiler for ExitStatus.kt:
Spoiler for discord.plugin.kts:
3 - make a new package called managers and add in the following:
Spoiler for ConfigManager.kt:
Spoiler for ListenerHandler.kt:
4 - make a new package called utils and add in the following:
Spoiler for ChatUtil.kt:
Spoiler for ChannelData.kt:
5 - make a new package called commands and add in the following:
Spoiler for Command.kt:
Spoiler for Registry.kt:
5 - Inside commands make a package called impl and add the following sample classes:
Spoiler for Players.kt:
Spoiler for PingCmd.kt:
Spoiler for HelpCmd.kt:
Remember this is just a base with a few commands here are some things to Improve:
- I know people will say about me using reflection i just like it so you can reload commands and such without having to add a new call into anything ... Can change if you don't like
- Expand on the utils class
- Current files are not well documented since i was not going to release this and it was only me working on it ... if needs be i can do it and release the code again
- A LOT MORE COMMANDS here is some commands you can add
- ::lookup (Shows a player high-scores card)
- ::link (Link your player account to discord bot)
- ::patches (Tells you how long your patches have left)
- ::ge (Tells you status of offers) - Announcement System
- Dms you when someone logs into your account
- Dms you when your patch is done
- Dms you when a ge offer is done
- Drops
- Events
- Updates
- Server is online / offline
- New player counts
- Hardcore ironman dies
If i get enough requests i will convert to java but its easy enough :)
Thanks.