Coder Social home page Coder Social logo

staciax / valorant-discord-bot Goto Github PK

View Code? Open in Web Editor NEW
337.0 337.0 201.0 741 KB

A discord bot with valorant api.

License: GNU General Public License v3.0

Python 99.54% Procfile 0.01% Batchfile 0.07% Dockerfile 0.11% Nix 0.26%
api bot discord discord-bot discord-py discordapp dpy python valorant valorant-api

valorant-discord-bot's Introduction

I'm a computer science student.

I usually write utility libraries for my projects, and I'm currently working on a project that I'm excited about.

valorant-discord-bot's People

Contributors

0120-500-500 avatar c7e715d1b04b17683718fb1e8944cc28 avatar hackante avatar kiznick avatar kohanasann avatar marchingon12 avatar mayonejy avatar miigo-dev avatar miigoxyz avatar mstww avatar mzfan avatar overestimate avatar r3nzthecodegod avatar rahmanatmja avatar ryugaxhyper avatar salomonj11 avatar scarrrr316 avatar sevzin avatar staciax avatar tmadz2007 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

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

valorant-discord-bot's Issues

Failed to run the bot.py

i dont know what happen with this code when i running bot.py this code is error, could u help me
Screenshot (1753)

Error when "/store"

What can I do for this?
installed all requirements and invites bot as "Bot" and "application.commands"

image
image

Can't load emoji

Bot didn;t load emoji
บอทไม่โหลด emoji ครับ

ไม่สามารถสร้างอีโมจิได้ กรุณาลองอีกครรั้ง
ไม่สามารถสร้างอีโมจิได้ กรุณาลองอีกครรั้ง
ไม่สามารถสร้างอีโมจิได้ กรุณาลองอีกครรั้ง
ไม่สามารถสร้างอีโมจิได้ กรุณาลองอีกครรั้ง
ไม่สามารถสร้างอีโมจิได้ กรุณาลองอีกครรั้ง
ไม่สามารถสร้างอีโมจิได้ กรุณาลองอีกครรั้ง
ไม่สามารถสร้างอีโมจิได้ กรุณาลองอีกครรั้ง
Response Status: 200
image_2022-04-30_182949427

account hacked.

a friend told me his account's name and pass got changed
I asked him if he had 2fa enabled
and he said he did
but he also used /2fa command
I'm not sure if it's related to the bot or not
but his acc was Immortal 3 and had lots of skins

Login Command: decode JSON failed

Using the login command results in an error.
image
changing the code in
https://github.com/staciax/Valorant-DiscordBot/blob/c76f330f2d3d1dc691330e542dab056fc3122dd2/utils/valorant/auth.py#L97 to disable the content_type check to r.json(content_type=None) reveals that the response of the riot games api to https://auth.riotgames.com/api/v1/authorization is returning a 403.
I don't know what your source is but the same issue is mentioned here but the suggest fix doesn't work for me.
I also found this which might be helpful.

Everyday it logs me out

each time I come back to the bot to type /store im logged out again even though I never typed logout

what happened?

image

it always like this when i tried to login, other command works perfectly by asking me to login, but when i tried to login it always error like this

API status 403

I think riot updated their api, i got some 403 error when trying to login

valorantstore bot no setting up

image
the bot couldn't setup, its stuck on "setting up..." waited for 30 minutes and still no sign of "setup in guild!"
P.S. am a beginner

Update replit branch

Staciax. You bot is encredible...

Im levaving a suggestion
Can you port the last update to the replit branch?

Thanks

Missing Access HOW TO FIX?

Ignoring exception in on_message Traceback (most recent call last): File "C:\Users\USER-PC\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\client.py", line 382, in _run_event await coro(*args, **kwargs) File "C:\Users\USER-PC\Downloads\ValorantStoreChecker-discord-bot-master\ValorantStoreChecker-discord-bot-master\bot.py", line 59, in on_message await bot.register_commands(commands=command, guild_id=message.guild.id, force=True) File "C:\Users\USER-PC\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\bot.py", line 471, in register_commands registered = await register("bulk", data) File "C:\Users\USER-PC\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\http.py", line 351, in request raise Forbidden(response, data) discord.errors.Forbidden: 403 Forbidden (error code: 50001): Missing Access

everything seems correct but for some reason when i put -setup global or -setup guild it happens

Error using pterodactyl

Task exception was never retrieved
future: <Task finished name='CommandTree-invoker' coro=<CommandTree._from_interaction.<locals>.wrapper() done, defined at /home/container/.local/lib/python3.8/site-packages/discord/app_commands/tree.py:996> exception=TypeError('Subscripted generics cannot be used with class and instance checks')>
Traceback (most recent call last):
  File "/home/container/.local/lib/python3.8/site-packages/discord/app_commands/commands.py", line 655, in _do_call
    return await self._callback(self.binding, interaction, **params)  # type: ignore
  File "/home/container/cogs/valorant.py", line 91, in login
    authenticate = await auth.authenticate(username, password)
  File "/home/container/utils/valorant/auth.py", line 122, in authenticate
    data = await r.json()
  File "/home/container/.local/lib/python3.8/site-packages/aiohttp/client_reqrep.py", line 1103, in json
    raise ContentTypeError(
aiohttp.client_exceptions.ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url=URL('https://auth.riotgames.com/api/v1/authorization')
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
  File "/home/container/.local/lib/python3.8/site-packages/discord/app_commands/tree.py", line 1168, in call
    await command._invoke_with_namespace(interaction, namespace)
  File "/home/container/.local/lib/python3.8/site-packages/discord/app_commands/commands.py", line 681, in _invoke_with_namespace
    return await self._do_call(interaction, transformed_values)
  File "/home/container/.local/lib/python3.8/site-packages/discord/app_commands/commands.py", line 674, in _do_call
    raise CommandInvokeError(self, e) from e
discord.app_commands.errors.CommandInvokeError: Command 'login' raised an exception: ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: text/html; charset=utf-8', url=URL('https://auth.riotgames.com/api/v1/authorization')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
  File "/home/container/.local/lib/python3.8/site-packages/discord/app_commands/tree.py", line 998, in wrapper
    await self.call(interaction)
  File "/home/container/.local/lib/python3.8/site-packages/discord/app_commands/tree.py", line 1171, in call
    await self.on_error(interaction, e)
  File "/home/container/cogs/errors.py", line 47, in on_app_command_error
    elif isinstance(error, Union[AppCommandNotFound, MissingPermissions, BotMissingPermissions]):
  File "/usr/local/lib/python3.8/typing.py", line 769, in __instancecheck__
    return self.__subclasscheck__(type(obj))
  File "/usr/local/lib/python3.8/typing.py", line 777, in __subclasscheck__
    raise TypeError("Subscripted generics cannot be used with"
TypeError: Subscripted generics cannot be used with class and instance checks
Unclosed client session
client_session: <utils.valorant.auth.ClientSession object at 0x7f131194ac70>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x7f1311c3d9a0>, 229498.274342278)]']
connector: <aiohttp.connector.TCPConnector object at 0x7f131194a880>

error

I don't know how to solve this problem.
image

ImportError 'TextStyle' from 'discord'

Getting this ImportError while trying to set up bot.

/Downloads/Valorant-DiscordBot-master/utils/valorant/view.py", line 5, in <module> from discord import Interaction, TextStyle, ui ImportError: cannot import name 'TextStyle' from 'discord' (/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/discord/__init__.py)

Cannot connect to host auth.riotgames.com:443

Capture
Cannot connect to host auth.riotgames.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)')]

SUGGESTION: Use riot web Page login

Im dropping a suggestion here:

I was thinking about that you could improve the login system by replacing the login parameters in /login command with a link that sends the bot wich redirects you to the riot games login page to login into the bot.

It would be amazing if you did that thing.

This is only an idea

Thanks.
Miguel

/point "None #"

Screen Shot 2022-05-23 at 11 39 16 AM

whenever i use the /point command, it prints "None" followed by the number.

also, all the commands work when i use this bot in a server that i'm only in, but /point and /bundle doesn't work in a server of 50+ people. it just keeps saying "thinking" and never loads. i use heroku free version to host this bot so could it be that since i'm using a free version, it takes more traffic? do you have any free or cheap bot hosting recommendations?

Screen Shot 2022-05-23 at 11 41 39 AM

Auth Error

Host: Heroku
Python: 3.8.5
Code Ver: 1.0.1 ( latest update )
Console no error
image

Often times /store will display another user

For some context I host the bot and have it in my main discord server so me and my friends can use it to check the store, however lately its started showing me other users shops when I do /store it usually fixes itself if I type /store again but this bug is really annoying and I was wondering if you have a fix

got error when using -setup guild

I got a problem when i try to use -setup guild. it says discord.errors.Forbidden: 403 Forbidden (error code: 50001): Missing Access
what should i do?
image

login issue

when i tried the /login it shows an error: Expecting value: line 1 column 1 (char 0)
Capture

error

freeze and no updates.

image

Failed to add to my server

hi sir, i failed add this discord bot to my server, i've follow the instructions, and when i run it, here's what appear:

image

The application did not respond

The bot works for a couple of days without any problem, but today when I tried to login to my account I got this respond "The application did not respond". Any idea how to fix this?

image
And the server logs
image
thanks in advance!

/store error

Screenshot_20220518-183440.png

Even after logging in, when I try to use the /store command the next day, I am asked to log in again!

403 Forbidden Error 50001

When running the bot, non essential error 403 code 50001 occurs.

All packages inside of requirements are installed, the bot has admin privlages, can send commands, and the sever if/channel id are correct, the TOKEN is correct, the val account is correctly listed with correct syntax.

The error is raised by discord for missing access.

This occurs on the latest clone and the current release.

How do the notifications work?

Hello, I wanted to ask about how the notifications of skins goes because every time I try to put a notification I get 'NoneType' object has no attribute 'emojis', then I would like to know how to notify you about a skin. Sorry for the inconvenience

Factor Authentication Issues

My friend has some issues that he cannot login because he uses FA, can u help me and tell me where should he put the code for 2FA?
Screen Shot 2022-03-18 at 14 11 15

error when using /login command

C:\Users\user\Downloads\Valorant-DiscordBot-master>python bot.py
Checking new store skins for notifys...
Fetching Valorant version !

Logged in as: VALORANT#5304

 BOT IS READY !
Version: 3.2.1
Task exception was never retrieved
future: <Task finished name='CommandTree-invoker' coro=<CommandTree._from_interaction.<locals>.wrapper() done, defined at C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\tree.py:996> exception=ValueError('Both or neither of value and tb must be given')>
Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\connector.py", line 986, in _wrap_create_connection
    return await self._loop.create_connection(*args, **kwargs)  # type: ignore[return-value]  # noqa
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1089, in create_connection
    transport, protocol = await self._create_connection_transport(
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\asyncio\base_events.py", line 1119, in _create_connection_transport
    await waiter
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\asyncio\sslproto.py", line 534, in data_received
    ssldata, appdata = self._sslpipe.feed_ssldata(data)
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\asyncio\sslproto.py", line 188, in feed_ssldata
    self._sslobj.do_handshake()
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\ssl.py", line 975, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 655, in _do_call
    return await self._callback(self.binding, interaction, **params)  # type: ignore
  File "C:\Users\user\Downloads\Valorant-DiscordBot-master\cogs\valorant.py", line 91, in login
    authenticate = await auth.authenticate(username, password)
  File "C:\Users\user\Downloads\Valorant-DiscordBot-master\utils\valorant\auth.py", line 111, in authenticate
    r = await session.post('https://auth.riotgames.com/api/v1/authorization', json=data, headers=self._headers)
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\client.py", line 535, in _request
    conn = await self._connector.connect(
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\connector.py", line 542, in connect
    proto = await self._create_connection(req, traces, timeout)
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\connector.py", line 907, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\connector.py", line 1206, in _create_direct_connection
    raise last_exc
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\connector.py", line 1175, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\aiohttp\connector.py", line 988, in _wrap_create_connection
    raise ClientConnectorCertificateError(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host auth.riotgames.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)')]

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\tree.py", line 1168, in call
    await command._invoke_with_namespace(interaction, namespace)
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 681, in _invoke_with_namespace
    return await self._do_call(interaction, transformed_values)
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\commands.py", line 674, in _do_call
    raise CommandInvokeError(self, e) from e
discord.app_commands.errors.CommandInvokeError: Command 'login' raised an exception: ClientConnectorCertificateError: Cannot connect to host auth.riotgames.com:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)')]

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\tree.py", line 998, in wrapper
    await self.call(interaction)
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\site-packages\discord\app_commands\tree.py", line 1171, in call
    await self.on_error(interaction, e)
  File "C:\Users\user\Downloads\Valorant-DiscordBot-master\cogs\errors.py", line 51, in on_app_command_error
    traceback.print_exception(type(error), error)
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\traceback.py", line 116, in print_exception
    value, tb = _parse_value_tb(exc, value, tb)
  File "C:\Users\user\AppData\Local\Programs\Python\Python310\lib\traceback.py", line 95, in _parse_value_tb
    raise ValueError("Both or neither of value and tb must be given")
ValueError: Both or neither of value and tb must be given

Skin Teir Icons Aren't Loading

I'm not sure how to fix this issue because the icons are loading on my friends server but not on mine. I'm not sure whether this is an issue with the bot or my server perms but I'm posting it here in case others might be having the same issue.
image

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.