jonasbohmann / democraciv-discord-bot Goto Github PK
View Code? Open in Web Editor NEWDiscord Bot for the r/Democraciv community written in Python3.
License: Mozilla Public License 2.0
Discord Bot for the r/Democraciv community written in Python3.
License: Mozilla Public License 2.0
Whenever I run the -addparty or -deleteparty commands, the bot crashes.
Seems like it's an issue with the asynchronous await
in config.py. I'll investigate this and leave this issue open to document it.
Traceback:
Unclosed client session
client_session: <aiohttp.client.ClientSession object at 0x758a87b0>
Unclosed connector
connections: ['[(<aiohttp.client_proto.ResponseHandler object at 0x75621880>, 361305.431396705)]']
connector: <aiohttp.connector.TCPConnector object at 0x758a8450>
task was destroyed but it is pending!
task: <Task pending coro=<DiscordWebSocket.close_connection() running at /usr/local/lib/python3.7/site-packages/discord/gateway.py:539> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x75743550>()]> cb=[shield.<locals>._done_callback() at /usr/local/lib/python3.7/asyncio/tasks.py:776]>
Exception ignored in: <coroutine object DiscordWebSocket.close_connection at 0x7573ebb8>
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/discord/gateway.py", line 539, in close_connection
File "/usr/local/lib/python3.7/site-packages/websockets/protocol.py", line 855, in close_connection
File "/usr/local/lib/python3.7/site-packages/websockets/protocol.py", line 880, in wait_for_connection_lost
File "/usr/local/lib/python3.7/asyncio/tasks.py", line 400, in wait_for
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 657, in call_later
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 667, in call_at
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 480, in _check_closed
RuntimeError: Event loop is closed
Task was destroyed but it is pending!
task: <Task pending coro=<Client._run_event() running at /usr/local/lib/python3.7/site-packages/discord/client.py:227> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x75873950>()]>>
Task was destroyed but it is pending!
task: <Task pending coro=<BotBase.close() running at /usr/local/lib/python3.7/site-packages/discord/ext/commands/bot.py:208> wait_for=<Future pending cb=[<TaskWakeupMethWrapper object at 0x74d40fb0>()]> cb=[Client._do_cleanup.<locals>.when_future_is_done() at /usr/local/lib/python3.7/site-packages/discord/client.py:498]>
I have noticed that sometimes people will reference parties by acronyms (ie MPN instead of Monarchist Party of Norway) or forget spaces (ie Cloud9 instead of Cloud 9). My idea is that we introduce 3 new commands:
-addpartyalias
: Creates a new party alias-removepartyalias
: Removes a party alias-listpartyalias
: Lists a parties name and all aliasesThe first two commands would be referenced like so -<command name> <party name>, <alias>
with the first simply having the party name or a related alias. For the sake of simplicity we can also make the capwordParties aliases which are automatically defined upon creating a party.
These aliases would be used as alternatives to actual party names. For example if MPN was an alias of Monarchist Party of Norway, -join MPN
would add the user to the Monarchist Party of Norway.
If you think the idea sounds good I can try to get started on it next week, however I am having my wisdom teeth removed tomorrow and am not sure when I will be able to start coding again. In addition to this just over a week after I am traveling without a computer. If I am not able to get it done next week I can work on it early September.
It would be a useful feature for the Speaker to be able to mark multiple bills as passed with one use of -leg pass
.
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.