Coder Social home page Coder Social logo

inhouse_bot's People

Contributors

mrtolkien avatar natebrady23 avatar renovate[bot] 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

inhouse_bot's Issues

Trouble running bot on server

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!

Is up to date? Create rooms together with QUEUE.

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?

Problem with setting the Command Prefix

Hey there, I tried following the instructions you've given but I seem to be having trouble setting the command prefix.
image
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.

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.

Hide # in the bot output

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.

Make the bot translatable

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! :)

Combined ELO

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!

Duo command ain't working

I have tested a many times the command to play duo queue but ain't working in my server.
"!queue adc @Otherplayer sup"

image

image

Could this be a bug or is it really not working?

where is the guide?

I can't find the guide to how to use docker, it says that the link is wrong

!Ranking Leaderboard 0 games

We're getting values for people with 0 games played. Is there any way to make it a requirement that someone has at least 1 game played before they're put onto a leaderboard?

fc0b36bde13b38942804441a5180485c

Can't access the database using adminer

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

Aram

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?

10 Players in Queue but games not found

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?

image

image

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.

image

problems with the matchmaking

i'm having a problem when the game should be added to the db. I transfered this bot from a PC to an other recently moving also the database with all files. Could that be the problem?
image

Translate to PT-BR

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.

tests error

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'

Question with ranking

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?

others db access problems

image
i'm having this problem and i don't know what is the problem, is there an other way to access to the database (maybe because is runned locally it exist? idk)

Discord update solution

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 ?

2 Issues

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'

image
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 :)

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

docker-compose
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
Dockerfile
  • python no version found
pip_requirements
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

  • Check this box to trigger a request for Renovate to run again on this repository

[Suggestion] Ingame role

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.

How to make dockerfile work?

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:

  1. Clone repo
  2. In docker-compose yaml making it point to local repo docker file instead of remote image
  3. docker-compose build
  4. docker-compose up

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

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.