Giter VIP home page Giter VIP logo

quotient-bot's Introduction

Language discord.py Version Db Library

Logo

Quotient - The Ultimate Discord Bot for Esports Management

Quotient is the ultimate open-source Discord bot designed specifically for esports servers. Our goal is to empower esports communities by simplifying and streamlining the organization and management of scrims, tournaments, and other events.

The source here is only for educational purposes.

Features

Quotient is a multi-functional bot that provides a comprehensive range of features, including:

- Automated Scrims Management
- Automated Tournaments Management
- Easy to use Web-Dashboard
- Community engagement tools
- and much much more...

Installation

To install Quotient, simply add the bot to your Discord server using the following link: Add Quotient to your server.
We would rather prefer you not running a direct cloned instance of Quotient. It would be a ton better to just Invite the running instance.

If you decide to edit, compile or use this code in any way. Kindly respect the LICENSE.

How do I contribute?

Contributions are Welcome:) kindly open an issue first for discussion. It's also a good option to join the Support Server

Contact Us

If you have any questions or feedback, please feel free to reach out to us on our Support Server or create an issue on this repository. Thank you for choosing Quotient!

License

This project is licensed under the MPL-2.0 license - see the LICENSE file for details.


Contributors ๐Ÿ‘ฅ

quotient-bot's People

Contributors

aadil-shaik avatar aayyuush99 avatar adityabhushan1 avatar agamswaroop619 avatar binacy avatar dagger-op avatar deadaf avatar deepsource-autofix[bot] avatar deepsourcebot avatar hrishikesh214 avatar imgbotapp avatar nitheesh-daram avatar p-pole avatar pranoymajumdar avatar quantumghost7 avatar rtk-rnjn avatar shashankkumarsaxena avatar vader-op avatar vein05 avatar viktoriussuwandi avatar wiper-r 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

quotient-bot's Issues

`qsnipe` does not work on forum posts

Steps to Reproduce:

  1. Send a message in forum post
  2. Delete the message
  3. qsnipe - give the following, it should've been the deleted message
    There's nothing to snipe :c

Discord seems to have a separate thread_id for forum posts, I guess it's trying to always look for channel_id

OS and other details: irrelevant for the issue

pstatus command shows outdated data

https://github.com/quotientbot/Quotient-Bot/blob/d9a6e32daeb141cfb0ed0ea8807fc2f4b9e2477a/src/cogs/premium/__init__.py#L38

pstatus command shows a user's premium status and the server's premium status, it was used in. but some of the fields no longer have any importance.

For User:

  • Remove Boosts Left.
  • Remove Boosted Servers.
  • Change Expiry to Ending:

For Server:

  • Change Boosted By to Upgraded By:
  • Change Expiry Time to Ending

In both:

Show expiry time using discord's latest timestamp feature, we already have a function that needs to be used.
Example Usage: https://github.com/quotientbot/Quotient-Bot/blob/d9a6e32daeb141cfb0ed0ea8807fc2f4b9e2477a/src/cogs/utility/events/reminder.py#L37

Use style d
image

subclass `CommandTree`

With every help command we make an API call to get a list of all slash commands in the bot. A better way to do this might be overriding fetch_commands method to cache the results.

Also, we need to figure out a way to mention sub-commands since parents mention doesn't work & is basically useless.

image

Implementation of features and aspects

I know what you said, I know you don't want but it's too hard for forigeners to buy a amazon.in gift cards.

  1. They mostly come from third party sites which takes a lot of tax and minimum price is โ‚น500 for Amazon.in gift card at most of the trusted sites also Quotient Prime isn't that costly.
  2. Not a good idea as people prefer PayPal / Cards / Crypto to pay.

I am not saying to remove the current one but you can use add some more options for premium like crypto.

You can use Coinbase or any other wallet and integrate with quotient bot and if you want to add cards, you can easily use Stripe which is most trusted.

Also I do not recommend using/accepting gift cards as you don't know from where they are buying, fraud has increased a lot and personally in my case someone sent me a amazon.in gift card and I added it after that amazon blocked my account and asked identity card.

Remember only Indians do not use Quotient.

I also request moderation features and maybe a backups feature for premium users in moderation?

figure out a configuration based system

to merge repositories of Quotient & Quotient Pro , a config based system needs to be implemented that changes the behaviour of the bot according to its name .

all commits related to this milestone should go into the merge branch.

export tourney data before deleting.

this is faced by a lot of users when they delete a tournament unintentionally, we should export the data for that tourney before deleting it and send it to their logs channel.

Whenever a tourney is deleted this function is called:
https://github.com/quotientbot/Quotient-Bot/blob/66bb79ecf08bd4c0bddee9cdefdc2715941f1aca/src/models/esports/tourney.py#L238

inside the above mentioned function, the get_csv function should be called to generate a file and that file should be sent to tourney.logschan
https://github.com/quotientbot/Quotient-Bot/blob/66bb79ecf08bd4c0bddee9cdefdc2715941f1aca/src/models/esports/tourney.py#L220

Checks kinda not working

https://github.com/quotientbot/Quotient-Bot/blob/06216a82416f06f0208a870b1092ca2bef75b481/src/cogs/giveaway/__init__.py#L44
I think the check kinda not working.

It should be something like:

def check(message: discord.Message):
  if message.author == ctx.author and message.channel == ctx.channel:
    if message.content.strip().lower() == "cancel": raise GiveawayError("Alright, reverting all process.")
    return True

Re-create:
User with Giveaways Role: qgcreate
Quotient Bot: <GW_EMBED>
Me the owner of the server: cancel
Quotient Bot:

Capture
Capture2

https://github.com/quotientbot/Quotient-Bot/blob/06216a82416f06f0208a870b1092ca2bef75b481/src/cogs/giveaway/__init__.py#L20
Also it would better, if not only giveaways, giveaways manager should be added too. Ugh. It look nicer

Create ISSUE_TEMPLATES

Along with #115 I would like to propose adding an issue template directory to this repository. This would allow contributors to easily create issues that follow a consistent format.

The issue template directory would contain a number of pre-written templates, each of which would be designed for a different type of issue. For example, there would be templates for bug reports, feature requests, and documentation requests.


image


It looks good tho', ๐Ÿฅบ isn't it?

Catch/raise errors properly

Not using dpy for quite while, but I think following block of code will eat all errors except ScrimError, TourneyError, PointsError. This all could be fixed by adding a raise error keyword/statement after that if block.

async def cog_command_error(self, ctx, error):
        if isinstance(error, (ScrimError, TourneyError, PointsError)):
            return await ctx.error(error)

Typo in `maintenance off` command

Typo in this line:

await ctx.success(
            f"Successfully changed settings for `{success}` channels. (`{sum(1 for i in check.channels)}` were hidden.)"
        )

It should be unhidden instead of hidden here :pain:

Original code

user mixup

while setting up scrims or tournament, if im the one who invoked the command so while entering the values of info it accepts other peopls answer whereas it should accept just mine.

Replit

Please modify this bot for replit tho.

[Bug] `qremind` uses specified TZ instead of UTC

The bot uses IST converted time, which is good for comparing human like time delta with to datetime (in 2 minutes).

  • When used times which matches ShortTime it localizes the datetime to IST (from UTC).
  • "2m" should be 2 minutes from now, but it just - timdealta(hours=5, minutes=30) (+05:30 "IST")

Panels for tagcheck & eztag.

Tagcheck & Eztag still requires commands for setup whereas other features such as Scrims & Tourney have panels with buttons, these cmds should be replaced with their own panels as well.
image
image

Handle errors properly.

We should consider handling error properly, instead of just raw try-except block.

try:
    ...
except:
    ...

Why this is needed??

message = await channel.send("Some Content!")

# We tried editing it

try:
    await message.edit(content='')
except:
    pass

Can see? above block will just eat all errors while the error is from our side.

Render a designed HTML page for payment successful / errors.

Context: along with the bot itself we run a simple web server that handles communication with a payment gateway, most of the bot's premiums are purchased though this way only.

As you can see https://github.com/quotientbot/Quotient-Bot/blob/62ac73accd2461f3af1582143fac40bf1c4a9319/src/server/app/payment.py#L92 , we return json responses to the user be it a success event or any error, while it might be cool for the devs but not a lot of users find it creative.

We need to write some HTML , design it with some css and render the file for errors & success events in https://github.com/quotientbot/Quotient-Bot/blob/main/src/server/app/payment.py

the HTML file should be named response.html & should be inside https://github.com/quotientbot/Quotient-Bot/tree/main/src/server/templates .

what is the task?

Note that this issue will be assigned to 2-3 contributors and the best PR will be merged, you don't need to do something fancy, simple is sexy. Do share screenshots of the changes in your PRs.

Add stickymsg

The stickymsg commands have already been added to custom bots, they should be added to Quotient as well.

remove Reminder Cog

The Reminder Cog is a cog that does not have any commands or events.

I propose that we completely remove the Reminder Cog and transfer all of its functions and methods to the bot core. This will simplify the codebase and make it easier to maintain.


Benefits

  • Simplification of the codebase
  • Easier maintenance
  • Reduced risk of bugs

Risks

  • Potential for downtime

I believe that the benefits of removing the Reminder Cog outweigh the risks.

config.py file not found

As to use this project for educational purpose please provide info config module used in this project.
That module can't be found any where.
If I am missing something kindly guide me....

show time in different format in scrims edit panel.

in scrims edit panel, the timestamp is shown in discord format 'R' which apparently is a bit difficult for users to understand.
We need to change it a bit show both.

1st change

shown like this:
image

should be shown like this:
image
Refer this line to know how this is done: https://github.com/quotientbot/Quotient-Bot/blob/d9a6e32daeb141cfb0ed0ea8807fc2f4b9e2477a/src/cogs/esports/views/scrims/main.py#L36
and in bracket keep the current format.

Line that needs to be edited: https://github.com/quotientbot/Quotient-Bot/blob/d9a6e32daeb141cfb0ed0ea8807fc2f4b9e2477a/src/cogs/esports/views/scrims/_edit.py#L65

2nd change

line that needs to be edited: https://github.com/quotientbot/Quotient-Bot/blob/d9a6e32daeb141cfb0ed0ea8807fc2f4b9e2477a/src/cogs/esports/views/scrims/_edit.py#L75

should be shown like
image

resources

discord timestamp styles:
image
docs: https://discord.com/developers/docs/reference#message-formatting-timestamp-styles

[enhancement] Add button on `author.send()`

I would like to request a feature that would allow bot to send a view when calling commands.Context.author.send(...). The view would have a single button with the label "Guild Name". The button would be disabled by default.


This feature would be useful for users who want to know the guild name in future when looking to older messages.


Something like this:
image


Although there are exactly 3 function call in entire codebase.

[URGENT MESSAGE FROM SWAYY] [URGENT MESSAGE FROM SWAYY]

@deadaf pls pin this msg in announcements or general where everyone can see it. (important)

A step back, for the miles ahead.

Hi everyone.
It seems like I would never be able to return to this server as Swayy. My discord account had 2FA and recently I was travelling from Delhi to Lucknow. On my way back, I lost my backpack. It had my laptop wallet and my phone too. So, I lost my Google Authenticator, backup codes and password too (I used lastpass as password manager). Unfortunately, Discord has replied that they will not be able to remove my 2FA, thus cutting down any chances of account recovery, and I won't feel the same vibe if I create a new account and join back. Everything is just lost. I had many memories with my account, many friends and many achievements. (no badges sadge) So, the conclusion is, my account is fucked forever and I don't feel like coming back to this platform again due to numerous reasons. I will keep trying to get my account back even though I know the chances are thinner than Rohit himself. I pray nothing but a touch of understanding ๐Ÿ™

Now since I'm gone, and I can't even text in the support server, here are some honourable mentions with the people I made memories with:
@deadshot#7999: Thanks for holding my hand in python. hehe. you gave me everything, trusted me as your admin, repository write access, quo coins etc. Thanks for everything. If I will return to Discord you'd be the first person whom I'll DM. Dont forget me pls
@ragegod#9: mera beta i lob u harami hi rehna aur betichod netflix pass nhi diye tum aakhiri samay jao lodu ๐Ÿ˜ 
@krypton#8888 10000 rs paisa barbaad lol, fir bhi humesha polite and sexy rahe tum dhanyawaad bro. humesha credit card ki kami tumne door ki lol
@aaru#0631 Thnx mujhse baat krne ke liye and bts frend hone ke liye lol and sorry ab mai bts ka boht bada virodhi hogya hu aur unka twitter par boht mazaak udata hu pain
@hrishikesh#9582 gaand hilade ek baar bhai hehe
Wiper Chacha: thnx valorant mai mujhse 1v1 haarne ke liye ๐Ÿ˜‚ tumhara dimaag boht bada hai acchi jagah hi lagana humesha
Ashish (lograck wala) bye bhay :")
Vein Joi Nepala
Scypher code karo padhai mai kuch nhi rakha hai tbh
Aman!#2484 and uska admin ym ka: bye guys tumhe bhi nhi bhullunga kabhi ๐Ÿ˜”

Honourable mentions (chutiye ke lye):
Alone: LOL bhai teri english sunke round the year entertainment hua. lekin tum chudbure ho CHUDBURE
Jash: bhangi hai yeh sabse bada fr

Guys all of you were great (except honourable wale lol), sorry if i missed someone jis time ye likhra tha jo jo online tha uske baare mai likh diya sorry agar koi dil ka kareebi choot gya ho.

I'd continue trying to come back ๐Ÿฅฒ
Life updates:
Preboards parso se. Exams from 25th April -> 19th May. (fawks)
Flying to UK on 21st June, maybe forever. Will work on some projects, not on swayy's github. Im deleting all my accounts id rather prefer to live an anonymous life for some reasons.
If i ever make a comeback, u can recognize me either with my name Abhinav or my texting style (way too cool tbh ๐Ÿ˜Ž )
Bye guys love youuuuuuuuuuuuu.

If anyone wants to still contact me for EMERGENCY PURPOSE please email me at [email protected] (NO REPLY WITHIN 2 DAYS MEANS I IGNORED YOU THANKS FOR UNDERSTANDING)

Rohit pls pin this in general or announcements chat i'd be grateful. ๐Ÿ™

[BUG] Invalid Argument + Unbound Variable

https://github.com/quotientbot/Quotient-Bot/blob/main/src/utils/converters.py#L46-L52

async def convert(cls, ctx, arg):
    with contextlib.suppress(AttributeError):
        match = re.match(r"\(?(\d+),?\s*(\d+),?\s*(\d+)\)?", arg)
        check = all(0 <= int(x) <= 255 for x in match.groups())

    if match and check:
        return discord.Color.from_rgb([int(i) for i in match.groups()])

Color.from_rgb() takes three arguments.
Should be return discord.Color.from_rgb(*[int(i) for i in match.groups()])

If the contextlib really suppress the AttributeError then the variable match and check will be undefined.

Migrate from Relative Imports to Absolute Imports

Project currently uses relative imports in several places, which can lead to various issues such as difficulties in refactoring, reduced readability, and complications when running tests or deploying the project. To improve the maintainability and clarity of our codebase, we should transition to using absolute imports.

Proposed Solution:

  1. Identify all relative imports in the project.
  2. Replace relative imports with absolute imports.
  3. Test the project thoroughly to ensure that the changes do not introduce any bugs or issues.

Example:

Current Relative Import:

from .module import SomeClass

Proposed Absolute Import:

from quotient.module import SomeClass

Make PR to rewrite branch only.

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.