A Discord bot that rewards players in Minecraft for sending messages on Discord

Overview

MCRewards-Discord-Bot

A Discord bot that rewards players in Minecraft for sending messages on Discord

How to setup:

  • Download this git as a .zip, or clone it.
  • Install the pip packages in requirements.txt with pip install -r requirements.txt or pip3 depening on how your system is setup.
  • Go to config.json and fill out the needed info.
  • Don't change levels.json or accountdata.json from the default ones on GitHub on first use, the bot will manage those files for you. After you have some data in them, you can change the vaules or whatever, just restart the bot once you do.
  • Start the bot with main.py.
  • Your users must link their Discord account to their Minecraft account with the mcr!link <username> command. Eg: mcr!link MrRazamataz. They will be reminded to link if they haven't every time they level up, otherwise the rewards won't work. They can change their username thats saved by re-running the command.

Other things and Info:

Idea comes from this thread on r/admincraft https://www.reddit.com/r/admincraft/comments/qh3175/plugin_for_ingame_rewards_for_being_active_in/

The code is simple, it's not meant to be advanced. Yes, there may be better ways to code this, like not using .json to store data or not using so many global variables, but it's simple and it works well.

The bot saves the levels.json file to disk from RAM every 3 mins.
Everytime a change is made to accountdata.json via a bot command, the changes are saved instantly.

Planned:

[ ] A method to protect against spam leveling up.
[ ] An easy way for admins to add reward commands.

Let me know of suggestions by creating an issue in the Github issues TAB.

Compatibility:

It is compatibile with every server software that offers support for rcon. Just fill out the info in config.json. It runs commands with the players username that is stored in accountdata.json. The commands currently can only be edited in the code (it's quite simple) in reward.py.

You might also like...
telegram bot for sell virtual number

Telefake Telegram bot for sell virtual number (fully automatic) Installation create bot in telegram upload script in website with php and ssl (https)

laravel package untuk memudahkan penggunaan MCA dengan Telegram Bot USDI di aplikasi Universitas Udayana.

MCA KubeMQ Laravel laravel package untuk memudahkan penggunaan MCA dengan Telegram Bot USDI di aplikasi Universitas Udayana. Motivasi Proyek ini berfu

 Telegram bot for CC Checker with hella lotta features.
Telegram bot for CC Checker with hella lotta features.

SDMN CHECKER BOT Telegram bot for CC Checker with hella lotta features. 📝 Table of Contents Dependencies / Limitations Future Scope Setting up a Hero

Integrate Your PHP Code With Telegram Bot API for Beginner

Documentation[https://core.telegram.org/bots/api] Resource[https://github.com/bachors/KBBI.sql] Integrate Your PHP Code With Telegram Bot API for Begi

Create and manage advanced polls with this Telegram Bot which has many features available!
Create and manage advanced polls with this Telegram Bot which has many features available!

MasterPollBot Create and manage advanced polls with this Telegram Bot which has many features available! Requirements Local Telegram Bot API or a webh

🤖 Telegram Bot API PHP SDK. Lets you build Telegram Bots easily! Supports Laravel out of the box.
🤖 Telegram Bot API PHP SDK. Lets you build Telegram Bots easily! Supports Laravel out of the box.

Telegram Bot API - PHP SDK Telegram Bot PHP SDK lets you develop Telegram Bots in PHP easily! Supports Laravel out of the box. Telegram Bot API is an

Simple telegram auto reminder BOT with PHP

Telebot Script Telegram BOT Auto Reminder Dibuat pake PHP OOP Sebenernya bukan buat dipublish sih, ini cuma buat praktek PHP OOP sama praktek Commit &

Simple php telegram bot.
Simple php telegram bot.

PHPTGBot Description Simple php telegram bot. Just for fun 🚧 Work In Progress 🚧 Maybe found error, since im not tested yet! Still on working, so be

A simple php telegram bot to check if the bin is valid or not!

Bin-Checker A simple php telegram bot to check if the bin is valid or not! Deploy FORK the Repo by clicking HERE Add your bot token in LINE 12 THEN DE

Comments
  • cant run main.py

    cant run main.py

    I have python and pip installed I followed the instructions on GitHub I installed requirements.txt this is the error I got in pycharm when I tried also running it in it

    Starting up... [MCRewards] Loaded cog [MCRewards] Loaded cog [MCRewards] Loaded cog Traceback (most recent call last): File "C:\Users\baccu\Desktop\MCRewards-Discord-Bot-main\main.py", line 40, in client.run(token) File "C:\Users\baccu\Desktop\MCRewards-Discord-Bot-main\venv\lib\site-packages\discord\client.py", line 723, in run return future.result() File "C:\Users\baccu\Desktop\MCRewards-Discord-Bot-main\venv\lib\site-packages\discord\client.py", line 702, in runner await self.start(*args, **kwargs) File "C:\Users\baccu\Desktop\MCRewards-Discord-Bot-main\venv\lib\site-packages\discord\client.py", line 666, in start await self.connect(reconnect=reconnect) File "C:\Users\baccu\Desktop\MCRewards-Discord-Bot-main\venv\lib\site-packages\discord\client.py", line 601, in connect raise PrivilegedIntentsRequired(exc.shard_id) from None discord.errors.PrivilegedIntentsRequired: Shard ID None is requesting privileged intents that have not been explicitly enabled in the developer portal. It is recommended to go to https://discord.com/developers/applications/ and explicitly enable the privileged intents within your application's page. If this is not possible, then consider disabling the privileged intents instead. Exception ignored in: <function _ProactorBasePipeTransport.del at 0x0000020770EF79A0> Traceback (most recent call last): File "C:\Users\baccu\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 116, in del self.close() File "C:\Users\baccu\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 108, in close self._loop.call_soon(self._call_connection_lost, None) File "C:\Users\baccu\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 745, in call_soon self._check_closed() File "C:\Users\baccu\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 510, in _check_closed raise RuntimeError('Event loop is closed') RuntimeError: Event loop is closed Exception ignored in: <function _ProactorBasePipeTransport.del at 0x0000020770EF79A0> Traceback (most recent call last): File "C:\Users\baccu\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 116, in del File "C:\Users\baccu\AppData\Local\Programs\Python\Python310\lib\asyncio\proactor_events.py", line 108, in close File "C:\Users\baccu\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 745, in call_soon File "C:\Users\baccu\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 510, in _check_closed RuntimeError: Event loop is closed

    Process finished with exit code 1

    opened by M1noa 2
Owner
Hello. I code crap and run a mc server. yay
null
A discord bot for creating github repo issues.

Discord Issue Bot A discord bot for creating github repo issues. Requires: php-zlib, php-json, mysql, composer Tested on: Ubuntu 20.04.3, PHP Version

null 1 Jan 20, 2022
PHP Telegram Bot based on the official Telegram Bot API with iTelegram Class.

iTelegram PHP Telegram Bot based on the official Telegram Bot API Bots: An introduction for developers Bots are special Telegram accounts designed to

iNeoTeam | آی نئو 5 Nov 9, 2022
PHP Telegram Bot based on the official Telegram Bot API

PHP Telegram Bot based on the official Telegram Bot API

null 4 Dec 8, 2021
A PHP package for handling client requests, sending response, database CRUD operations, among others, easily

Zam Zam helps to receive and process client request(s), return response to client with appropriate header and database CRUD operation for a more robus

SirMekus 3 Dec 31, 2022
Lightweight PHP library for WhatsApp API to send the whatsapp messages in PHP provided by ultramsg.com

Ultramsg.com WhatsApp API PHP SDK Lightweight PHP library for WhatsApp API to send the whatsappp messages in PHP provided by Ultramsg.com Installation

Ultramsg 117 Dec 26, 2022
Alfred workflow to convert a time to dynamic Discord timestamp

Whencord for Alfred Takes a time string and converts it to a dynamic timestamp for sharing in Discord. Download Download the latest release here. Note

null 2 Jan 6, 2022
Embed live members' count from all your Discord server in your WordPress website

Live Members Counter For Discord This is the repository for the WordPress plugin: Live Members Counter for Discord Live Members Counter For Discord is

null 1 Oct 30, 2021
A discord-feature rich API plugin for PMMP.

DiscordBot DiscordBot a core plugin that provides an extensive API for plugins to interact with a discord bot creating endless possibilities. Examples

null 2 Jan 9, 2022
A telegram bot to check credit cards. written in php & py

MRBANKER BOT A telegram bot to check credit cards. written in php & py. You can find me on telegram STEP1: goto botfather create a bot copy the token

Nitin1818 48 Dec 30, 2022
NovaGram - An elegant, Object-Oriented, reliable PHP Telegram Bot Library

An elegant, Object-Oriented, reliable PHP Telegram Bot Library Full Documentation • Public support group Examples • Features • Installation ?

Gaetano 165 Jan 6, 2023