GithubHelp home page GithubHelp logo

jgayfer / spirit Goto Github PK

View Code? Open in Web Editor NEW
25.0 4.0 17.0 319 KB

Spirit is a Destiny 2 Discord bot to assist players with everything from clan management to keeping track of in game events.

License: MIT License

Python 99.96% TSQL 0.04%
destiny-api discord-py discord-bot mysql bot

spirit's Introduction

Spirit

Spirit is a discord bot designed to assist Destiny 2 players with everything from clan management to keeping track of in game events.

Spirit is no longer actively hosted/maintained, but feel free to tweak and run the code yourself!

Getting Started

Below are the steps to run the bot. Ideally you would be doing this for development/testing purposes, as I would prefer it if you didn't run an instance of the bot; I'd much prefer you just add mine to your server :)

Prerequisites

To run the bot, you'll need the following:

  • Python 3.5+
  • Pip
  • MySQL
  • Redis Server (using the default port)
  • Pydest
  • Spirit Server
  • Bungie.net API app

Running the Bot

Note: Before the bot can be run, it's essential that both Pydest and the Spirit Server are installed and setup first.

Install the required Python modules with Pip, as well as the latest version of Discord.py

pip3 install -r requirements.txt
python3 -m pip install -U git+https://github.com/Rapptz/discord.py@rewrite#egg=discord.py[voice]

Then create a MySQL database with support for UTF8mb4 encoding

mysql -u root -p
> create database <database_name> character set UTF8mb4 collate utf8mb4_bin

Add the schema located at db/schema.sql

mysql -u root -p <database_name> < ./db/schema.sql

Finally, create a credentials.json file at the root level of this project.

{
  "token": "token",
  "dbname": "name",
  "dbhost": "host",
  "dbuser": "username",
  "dbpass": "password",
  "d2-api-key": "your-key",
  "client_id": "your-client-id"
}

That's it! The bot can now be run with

python3 spirit.py

If you play on using the register command, ensure that Spirit Server is also running.

Built With

  • discord.py - An API wrapper for Discord written in Python

spirit's People

Contributors

dependabot[bot] avatar jgayfer avatar kdanthony avatar melange396 avatar phillyphenning avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

spirit's Issues

Some users receive duplicate broadcast messages

If a user owns more than one server that Spirit is a part of, they will receive multiple broadcast messages. A check needs to be added to ensure that the message is only sent out to unique users.

Choose platform with a reaction

Instead of having to enter in the platform by hand, it would be better if reactions could be used. This would make the experience of registering much easier for the user.

Trials stats

This will be added in as !stats trials. The API has this information available, with the exception of number of flawless runs. This value is important; some investigation will be needed as to where we can find it.

Paginate character loadout

It would be near if a used could page through all of their characters with the loadout command.

For info on how to do this, check out cogs/utils/paginator.py and how it's used in cogs/item.py

Note: This on hold until this Discord bug is fixed, as the bold formatting in the Loadout message will be affected.

Raid stats

We will add this onto the existing stats command as !stats raid

OAuth 2.0 registration

Moving to OAuth registration will allow for authenticated API calls. This will mean accessing players items and other information. It will also allow for easy access to all platforms a user plays on.

Raid stats command

Add a new !stats raid command that shows aggregate information about an account's raid stats.

Paginate character loadouts

Currently, the loadout command only shows the last player character. To improve user experience, we can use paginator.py to allow for all characters to be displayed, similar to the item command.

Add clan command

The first iteration of the clan command should show information such as:

  • Clan name and description
  • Level and perks
  • Number of members
  • Engrams earned this week
  • Weekly and overall XP progress

Add reaction to indicate event standby

Right now standby is only triggered if the event is full and a user accepts it. This should be changed so that a user can indicate that they would like to be on standby when the event still has room.

Deleting command "spam" messages is slow

This is due to the limitation of the API where messages can only be removed individually at a rate of 5 per second. It's possible that this issue could be overcome if purge_from() is used instead.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.