pluralkit / pluralkit Goto Github PK
View Code? Open in Web Editor NEWHome Page: https://pluralkit.me/
Home Page: https://pluralkit.me/
And perhaps make it import it anyway if every imported member has the same tag
When using the database_uri in config, pk will throw a key error.
Recreating annabelle-proxy_bot_1 ... done
Recreating annabelle-proxy_api_1 ... done
Attaching to annabelle-proxy_api_1, annabelle-proxy_bot_1
api_1 | Traceback (most recent call last):
api_1 | File "api_main.py", line 202, in <module>
api_1 | web.run_app(run())
api_1 | File "/usr/local/lib/python3.6/site-packages/aiohttp/web.py", line 53, in run_app
api_1 | app = loop.run_until_complete(app)
api_1 | File "/usr/local/lib/python3.6/asyncio/base_events.py", line 473, in run_until_complete
api_1 | return future.result()
api_1 | File "api_main.py", line 197, in run
api_1 | os.environ["DATABASE_URI"]
api_1 | File "/usr/local/lib/python3.6/os.py", line 669, in __getitem__
api_1 | raise KeyError(key) from None
api_1 | KeyError: 'DATABASE_URI'
bot_1 | [2019-03-07 17:26:50,556] [discord.client] [WARNING] PyNaCl is not installed, voice will NOT be supported
bot_1 | [2019-03-07 17:26:50,557] [discord.client] [INFO] logging in using static token
annabelle-proxy_api_1 exited with code 1
bot_1 | [2019-03-07 17:26:51,797] [discord.gateway] [INFO] Created websocket connected to wss://gateway.discord.gg?encoding=json&v=
bot_1 | [2019-03-07 17:26:51,799] [discord.gateway] [INFO] Shard ID None has sent the IDENTIFY payload.
api_1 | Traceback (most recent call last):
api_1 | File "api_main.py", line 202, in <module>
api_1 | web.run_app(run())
api_1 | File "/usr/local/lib/python3.6/site-packages/aiohttp/web.py", line 53, in run_app
api_1 | app = loop.run_until_complete(app)
api_1 | File "/usr/local/lib/python3.6/asyncio/base_events.py", line 473, in run_until_complete
api_1 | return future.result()
api_1 | File "api_main.py", line 197, in run
api_1 | os.environ["DATABASE_URI"]
api_1 | File "/usr/local/lib/python3.6/os.py", line 669, in __getitem__
api_1 | raise KeyError(key) from None
api_1 | KeyError: 'DATABASE_URI'
bot_1 | [2019-03-07 17:26:52,154] [discord.gateway] [INFO] Shard ID None has connected to Gateway: gateway-prd-main-wrhh, discord-s
api_1 | Traceback (most recent call last):
api_1 | File "api_main.py", line 202, in <module>
api_1 | web.run_app(run())
api_1 | File "/usr/local/lib/python3.6/site-packages/aiohttp/web.py", line 53, in run_app
api_1 | app = loop.run_until_complete(app)
api_1 | File "/usr/local/lib/python3.6/asyncio/base_events.py", line 473, in run_until_complete
api_1 | return future.result()
api_1 | File "api_main.py", line 197, in run
api_1 | os.environ["DATABASE_URI"]
api_1 | File "/usr/local/lib/python3.6/os.py", line 669, in __getitem__
api_1 | raise KeyError(key) from None
api_1 | KeyError: 'DATABASE_URI'
annabelle-proxy_api_1 exited with code 1
api_1 | Traceback (most recent call last):
api_1 | File "api_main.py", line 202, in <module>
api_1 | web.run_app(run())
api_1 | File "/usr/local/lib/python3.6/site-packages/aiohttp/web.py", line 53, in run_app
api_1 | app = loop.run_until_complete(app)
api_1 | File "/usr/local/lib/python3.6/asyncio/base_events.py", line 473, in run_until_complete
api_1 | return future.result()
api_1 | File "api_main.py", line 197, in run
api_1 | os.environ["DATABASE_URI"]
api_1 | File "/usr/local/lib/python3.6/os.py", line 669, in __getitem__
api_1 | raise KeyError(key) from None
api_1 | KeyError: 'DATABASE_URI'
annabelle-proxy_api_1 exited with code 1
^CGracefully stopping... (press Ctrl+C again to force)
Stopping annabelle-proxy_api_1 ... done
Stopping annabelle-proxy_bot_1 ... done
Using the same uri in docker-compose.yml
functions correctly.
Is there any kind of quick guide for this please?
Currently, the pk;member set
command tree is kind of unintuitive, and a lot of users struggle with it. I'll probably be refactoring it to read pk;member avatar <name> <url>
and similar, restructuring the parameter order.
Just did a pull to update my bot, however docker-compose throws an error.
Collecting pytz (from -r requirements.txt (line 9))
Downloading https://files.pythonhosted.org/packages/61/28/1d3920e4d1d50b19bc5d24398a7cd85cc7b9a75a490570d5a30c57622d34/pytz-2018.9-py2.py3-none-any.whl (510kB)
Collecting timezonefinder (from -r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/38/2c/8fcd7bc6d6ecb4a1ae043c27488ede4aba5d48d5ec47e25ee8401d7c648b/timezonefinder-3.4.2-py2.py3-none-any.whl (37.2MB)
Collecting typing; python_version < "3.7" (from aiodns->-r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/4a/bd/eee1157fc2d8514970b345d69cb9975dcd1e42cd7e61146ed841f6e68309/typing-3.6.6-py3-none-any.whl
Collecting pycares>=3.0.0 (from aiodns->-r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/85/de/cd46a73e43e206a6ad1e9cf9cc893c3ed1b21caf57f1e0a8d9a119d290eb/pycares-3.0.0.tar.gz (211kB)
Complete output from command python setup.py egg_info:
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libffi', required by 'virtual:world', not found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libffi', required by 'virtual:world', not found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libffi', required by 'virtual:world', not found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libffi', required by 'virtual:world', not found
Package libffi was not found in the pkg-config search path.
Perhaps you should add the directory containing `libffi.pc'
to the PKG_CONFIG_PATH environment variable
Package 'libffi', required by 'virtual:world', not found
c/_cffi_backend.c:15:17: fatal error: ffi.h: No such file or directory
#include <ffi.h>
^
compilation terminated.
Traceback (most recent call last):
File "/usr/local/lib/python3.6/distutils/unixccompiler.py", line 118, in _compile
extra_postargs)
Looks like an issue with pycares, which I'm hazarding a guess is a requirement for timezonefinder.
Pull stuff being used from the Discord API (basically only message sending, waiting for interactions (eg. reactions or deletions, and user lookup) into a backend-agnostic class that can easily be mocked for testing purposes.
Embeds break past 1024 characters per field, so if you try to set a description past that (up to 2000, which is the command message limit), it'll silently break posting the card.
the message card always has "(unknown, message deleted)" set as the message contents.
there is likely a problem with this function or the data being passed to it in line 57
https://github.com/xSke/PluralKit/blob/10746ae807bb5db7f6de57927bd4974efa3d074c/src/pluralkit/bot/commands/message_commands.py#L7
Posting a single message like this:
[foo]
{bar}
would match "foo" on [text] and "bar" on {text}
Possibly limit to 3 or 5 or so for abuse reasons
Right now that's not a field. I forgot it, I think.
(do comment with more suggestions!)
custom stuff for servers
examples:
pk;prefix kek;
changes commands to kek;command
pk;blacklist #channel
adds channel to proxying blacklist (easier for mobile server owners who struggle w/ bot permissions and just give pk admin)so i added two tulpas to Pluralkit. only one of them, Pluralkit doesn't acknowledge. i keep trying to do stuff with it but it keeps saying that the tulpa doesn't exist. and the Coloring. i tried hex codes and it keeps saying that the hex codes aren't valid. even when i tried the hex code it used as an example. you people really need to make it more manageable to use.
Should explain how to run, at least
It should raise a confirmation dialog if you try to register a member with a name that already exists, or try to rename a member to a name that already exists. Duplicate names are supported, but should be discouraged and prevented from occurring by accident.
Add the ability to @ mention Pluralkit in order to do commands, so there's less requirement to know/remember things like pk; as a prefix.
Is there a reason that pluralkit has no license openly displayed in the repo? The lack of a license discourages contribution from devs like me.
I'd like to pull database methods into a DatabaseConnection class instead of having free functions being called with a "conn" object that gets passed around. This could possibly handle pooling automatically on a per-request basis, although that might conflict with transaction support.
Some apps/platforms insert "smart quotes" instead of regular quotes, messing multi-word argument quote handling up.
https://www.fileformat.info/info/unicode/category/Pi/list.htm
https://www.fileformat.info/info/unicode/category/Pf/list.htm
Should probably collapse this to a single standard double-quote character
I'd like to pull the stat stuff into a StatCollector class that can either no-op (or perhaps log), or report to InfluxDB, depending on whether it's enabled or not. This will likely be done with subclassing.
Members should be able to set a "display name" or "nickname" that'll be used when proxying messages and possibly in various card embeds, but not when executing commands. This is for more advanced use cases than the system tag, and could for example be useful if your display name contains emojis, fancy punctuation or spaces.
Tupperbox recently added an export command, rework the import command to take that into account.
Also, it changed name.
Commands would use this time zone when outputting information and parsing time offsets.
Would probably be best implemented on a per-system basis, and if an account is linked to the system, will use said time zone for all output. Accounts with no system will use UTC as a default.
This would have a pk;system timezone <zone>
command. It would attempt to parse the time zone, and ask for verification while displaying the current time in said time zone, so the user can verify it's correct.
Possible considerations:
pytz
dependency, probably). The latter would be easier, but wouldn't update as DST changes, requiring a manual change that's likely to go unnoticed by the user.Currently if a user tries to set a custom emoji as their systems tag, PluralKit responds with:
Can't have system tag longer than 32 characters.
The real issue as discussed in the support server is that discord can't use custom emoji. I recommend adding a check to test if a user tried to pass a custom emoji, and then to return an error if they did. For example:
Sorry, but custom emojis are not supported due to a discord limitation, please use a standard emoji instead.
At the moment, commands use spaces as markers for the next segment of a command. If you use both a given name and a forename, a command will not take it in as a whole name. Even when using quotes, it will try to split it.
While there is an alternative method, using id's, it's more likely a member will remember the name at all times.
Could you please modify commands that use member names to be able to take names with spaces in quotes as well?
And while I have a system name that's just a single word, it would probably be if benefit from the same addition to the commands feature set.
Cheers.
Should be configurable by an environment variable, and will dump all unexpected exceptions there.
Sub-features:
pk;system
and add a form of ellipsis referring to the member list command (or perhaps don't show members at all?)As stated on the tin.
May be related to #55
Discord currently has a 1 MB file size limit on avatars sent from webhooks. Either have it warn you if the avatar you choose exceeds that limit, or even have it compress or resize it for you.
Currently users can only assign birthdates as Year, Month, Day, but it would be preferable to allow Year, Month, No Day or simply Month or Year, Day on its own would make no sense though
You should be able to categorize members in groups.
Sub-features:
Considerations:
Should dump an error in the chat if it's lacking manage webhook or manage messages permission instead of just silently failing and throwing to #error-log.
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.