mrtolkien / inhouse_bot Goto Github PK
View Code? Open in Web Editor NEWA Discord bot to handle League of Legends in-house games.
License: GNU General Public License v3.0
A Discord bot to handle League of Legends in-house games.
License: GNU General Public License v3.0
Hello,
Sorry for the direct issue raised like this, but after a few hours of debugging I guessed this was the only way to get some help.
I know the readme says this is no longer maintained, but I suspect it should still run and work as the Video tutorial guide says.
I've done this in the past on my local machine (about 1-2 years ago) running on WSL and Docker desktop and it worked fine.
I'd like to set it up again but this time I'm setting up a VPS server. Followed the tutorial again, downloaded docker etc.
When I run docker-compose up -d
, however, I am getting this error below when I docker logs [containerid]
. I've definitely added the bot token to INHOUSE_BOT_TOKEN in the docker-compose.yml file, the error doesn't give me much else... and it times out after 5minutes.
Traceback (most recent call last): File "/inhouse_bot/run_bot.py", line 13, in <module> bot.run() File "/inhouse_bot/inhouse_bot/inhouse_bot.py", line 57, in run super().run(os.environ["INHOUSE_BOT_TOKEN"], *args, **kwargs) File "/usr/local/lib/python3.9/site-packages/discord/client.py", line 708, in run return future.result() File "/usr/local/lib/python3.9/site-packages/discord/client.py", line 687, in runner await self.start(*args, **kwargs) File "/usr/local/lib/python3.9/site-packages/discord/client.py", line 650, in start await self.login(*args, bot=bot) File "/usr/local/lib/python3.9/site-packages/discord/client.py", line 499, in login await self.http.static_login(token.strip(), bot=bot) File "/usr/local/lib/python3.9/site-packages/discord/http.py", line 291, in static_login data = await self.request(Route('GET', '/users/@me')) File "/usr/local/lib/python3.9/site-packages/discord/http.py", line 185, in request async with self.__session.request(method, url, **kwargs) as r: File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 1012, in __aenter__ self._resp = await self._coro File "/usr/local/lib/python3.9/site-packages/aiohttp/client.py", line 582, in _request break File "/usr/local/lib/python3.9/site-packages/aiohttp/helpers.py", line 596, in __exit__ raise asyncio.TimeoutError from None asyncio.exceptions.TimeoutError
I've tried to clone it locally and install all the python packages 1 by 1 but that's a little tedious and I hit an SQL related error:
File "/home/linuxbrew/.linuxbrew/Cellar/[email protected]/3.9.4/lib/python3.9/site-packages/psycopg2/__init__.py", line 122, in connect conn = _connect(dsn, connection_factory=connection_factory, **kwasync) sqlalchemy.exc.OperationalError: (psycopg2.OperationalError) connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: No such file or directory Is the server running locally and accepting connections on that socket?
I'd like to make use of the fact that this application was containterized so this route isn't my first option.
Any help on the first error would be appreciated. Thanks!
Hey, I'm Oliv, from Brazil, I will use this bot in a brazilian server and I want to contribute with you! But I not programming in python, I programming in JS.
My friend asked me to create another bot that would create a voice room when the queue is completed, I think that when these other bots are finished, I will be able to unifique with yours through an api in docker file. What do you think about?
This code is up to date?
Hey there, I tried following the instructions you've given but I seem to be having trouble setting the command prefix.
In this image the two commented lines are what I've tried as well as INHOUSE_BOT_COMMAND_PREFIX = "&" and INHOUSE_BOT_COMMAND_PREFIX = & to try to set the prefix to &, but all of them didn't seem to do the trick so I would greatly appreciate a bit more help on setting the changed prefix
Add a fill role to the matchmaking system where they are placed in any role needed to create a game. I think this is really nice as an addition for those who don't care about their role.
While this is supposed to be an internal tool I am pretty sure that some player will end up showing it on stream and showing the # of a players discord name might not be what everyone wants.
Hiding it to allow people in Streamer Mode to stay that way would be better.
We're making good use of the bot for CBLOL and other Brazilian tier 3 leagues.
Would it be possible for you to make the bot translatable? Maybe a folder with files for strings in each language?
I'd love to help with translation to portuguese.
Thanks! :)
Pretty much title. Would be nice if it was possible to create discord roles to allow certain users to queue a specific role.
Is there any safe way to combine the elo instead of dividing it into roles? Users that get high MMR will just queue up as other roles and throw the matches so they stay on top. Love your work!
I have tested a many times the command to play duo queue but ain't working in my server.
"!queue adc @Otherplayer sup"
Could this be a bug or is it really not working?
I can't find the guide to how to use docker, it says that the link is wrong
I am having trouble accessing the database using adminer the page opens up but whenever I try to access the database it says FATAL: password authentication failed for user "adminer" and I am typing the password exactly like my POSTGRES_PASSWORD: any help is appericated
pipenv run python run_bot.py : https://paste.pythondiscord.com/qofurotihe.py
Hi, first congratulations on the bot, I managed to make it work perfectly on my server, but we are a community of aram, I tried some modifications but nothing enough to convert it, could you help us with that?
So I've made some quick research on python and I cant get to install your bot on my discord. Followed every steps in the installation section but when I get to pipenv run python run_bot.py it shows me this: https://paste.pythondiscord.com/itopuqobud.py . What am I missing? I'm thinking I should put something else than just my bot token in the run_bot file. Thanks !
When I get 10 people to queue up, the bot doesn't seem to do anything past that. I was expecting a "queue pop" and players will be able to accept from there?
Currently trying to figure out where exactly to put the INHOUSE_BOT_TEST=1
environment variable but having trouble. Would it need to go in the docker-compose.yml as well? I've tried env file as well and it doesn't seem to be working.
Could we increase the time it takes to accept the match to 5 minutes from the last reaction? Requested from players
I want to translate the bot to 'pt-BR', I think we can create a JSON for each language that defaults to English, but I would need a service that would load the translation files in the other services.
How could we implement this? A factory that generates an instance of a class that through its methods takes the text in the configured JSON?
I don't know Python, just GO and Javascript (Typescript), I will learn Python to try to contribute to this incredible project and I thank you for the bot.
I will run the translation replacing the English text for now on another branch.
i'm getting this error when i put the tests env.:
Traceback (most recent call last):
File "/inhouse_bot/run_bot.py", line 11, in <module>
bot = InhouseBot()
File "/inhouse_bot/inhouse_bot/inhouse_bot.py", line 52, in __init__
from tests.test_cog import TestCog
ModuleNotFoundError: No module named 'tests'
Is there a way to have more than 100 pearson on the command !ranking? And btw, i'm having a lot of problems with the database, i can't access it, i thought the password and the nick are the one i modify in the docker compose but what about the others settings the other credential it ask? Like server and database?
discord had an update in which the bot stopped working, which in this case commands like prefix ''!, %, $'' don't work. Would you be able to update to commands like /queue top ?
First of all, when you try to enable the test system, docker shows this message on "inhouse_bot_inhouse_bot_1" console:
Traceback (most recent call last):
File "/inhouse_bot/run_bot.py", line 11, in <module>
bot = InhouseBot()
File "/inhouse_bot/inhouse_bot/inhouse_bot.py", line 52, in __init__
from tests.test_cog import TestCog
ModuleNotFoundError: No module named 'tests'
Also the voice chat creating is not working, the match starts but the voice call is never created... I tried to figure it out with prints/messages just before the voicecall creating function is called on queue_cog.py but even this message is working.
if ready is True:
await ctx.send("Test1")
# We drop all 10 players from the queue
game_queue.validate_ready_check(ready_check_message.id)
await ctx.send("Test2")
# We commit the game to the database (without a winner)
with session_scope() as session:
session.expire_on_commit = False
game = session.merge(game) # This gets us the game ID
await ctx.send("Test3")
queue_channel_handler.mark_queue_related_message(
await ctx.send(embed=game.get_embed("GAME_ACCEPTED"),)
)
await ctx.send("Test4")
# We create voice channels for each team in this game
await create_voice_channels(ctx, game)
await ctx.send("Test5")
Hope mrtolkien can fix it so the bot will work perfectly :)
instead of creating more server based on elo or stuff like that there is a possibility to separate the matchmaking and the MMR in pro section and amateur just like this guy did. https://github.com/KennethWangDotDev/discord-inhouse-league.
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
These updates have all been created already. Click a checkbox below to force a retry/rebase of any.
docker-compose-example.yml
mrtolkien/inhouse_bot no version found
postgres alpine
adminer no version found
docker-compose.yml
postgres alpine
adminer no version found
Dockerfile
python no version found
requirements.txt
discord-py no version found
sqlalchemy no version found
trueskill no version found
tabulate no version found
rapidfuzz ==0.12.5
inflect no version found
dateparser no version found
matplotlib no version found
mplcyberpunk no version found
lol-id-tools no version found
psycopg2 no version found
discord-pretty-help no version found
Hi
I would appreciate if anyone can help me install it on me. (Put the token on him.) I tried to follow this steps:
Installation
But I always get this error:
Thank you!
ps. Sorry but I don't know where to ask these things.
We're using the bot for inhouses with players from the tier 3 leagues from Brazil. Sometimes, people want to listen to the player's comms, but forget to mute their mics.
A solution I thought of would be to have a role that is assigned to people currently in games, and that role would have permission to talk in the game channels.
Other use cases probably exist, like revealing game channels only to those playing, etc.
I am trying to use the dockerfile in the application but I am getting
"TypeError: BotBase.add_listener() got some positional-only arguments passed as keyword arguments: 'func'"
Steps I am doing:
Can anyone assist me?
also for reference I got it working with the remote image, but now I want to add some features to the code thats why I want to get local repo working
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.