GithubHelp home page GithubHelp logo

imptype / leaderboards-discord-bot Goto Github PK

View Code? Open in Web Editor NEW

This project forked from deta/deploy-to-deta-button-example

0.0 0.0 0.0 52 KB

A basic leaderboards Discord bot.

License: MIT License

Python 100.00%

leaderboards-discord-bot's Introduction

FEB 14 2023 UPDATE: Deta Cloud moved to Deta Space

This guide is partially broken. The code still works but the steps for deploying/hosting is different. Use https://github.com/imptype/deta-space-fastapi-example for the updated steps, and you'll need to modify the Spacefile to include the environment variables (check the docs).

Information

This is an interactions-only discord bot hosted on Deta. Its purpose is to serve a basic leaderboards system.

Commands

An asterisk (*) means staff can only use it.

  • /ping - pings the bot.
  • */1v1 <winner> <loser> - winner awarded 5 points and loser deducted 5 points.
  • */setpoints <user> <points> - gives the user points.
  • /getpoints <user> - views the user's points.
  • */getall - views everyone's points, in descending order, capped at 4000 characters.

Running the bot

  1. Make a new project on Deta.
  2. Make a new application on Discord.
  3. Click the 'Deploy to Deta' button on this repo.
  4. Select your project and enter the environment variables.
  5. Once deployed, visit this page of the Micro's URL https://{id}.deta.dev/update_commands to register the slash commands for the first time.
  6. Set the Interactions Endpoint URL to https://{id}.deta.dev/discord in https://discord.com/developers/applications/{id}/information.

Refresh Discord if the slash commands don't show up immediately.

Deploy

Click the following button to deploy this Micro in your own Deta project:

Deploy

leaderboards-discord-bot's People

Contributors

aavshr avatar abdelhai avatar imptype avatar

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.