snaacky / chiya Goto Github PK
View Code? Open in Web Editor NEWA moderation-heavy general purpose Discord bot
License: The Unlicense
A moderation-heavy general purpose Discord bot
License: The Unlicense
example
Something like this, with a link to the original post.
a command like /leaderboard for chiya to show users with more joys like a top 10 or top 20 like this message
https://discord.com/channels/974468300304171038/974483607211089930/1237985258352410654
Describe the bug
If a user has characters in their name from other character encodings such as symbols from latin-1, it breaks bot features. Interestingly enough, things like !warns will still say they went through successfully on the mods end but the end-user will never receive the DM.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Other character encodings not to break the bot.
Screenshots
N/A
Additional context
Chat context:
https://canary.discord.com/channels/622243127435984927/828021856358367272/828240662591176778
Log from console:
--- Logging error ---
0|chiya | Traceback (most recent call last):
0|chiya | File "/usr/lib/python3.8/logging/__init__.py", line 1084, in emit
0|chiya | stream.write(msg + self.terminator)
0|chiya | UnicodeEncodeError: 'latin-1' codec can't encode character '\u014d' in position 63: ordinal not in range(256)
0|chiya | Call stack:
0|chiya | File "/home/snaacky/Chiya/chiya.py", line 56, in <module>
0|chiya | bot.run(config.token)
0|chiya | File "/home/snaacky/.local/lib/python3.8/site-packages/discord/client.py", line 708, in run
0|chiya | loop.run_forever()
0|chiya | File "/usr/lib/python3.8/asyncio/base_events.py", line 570, in run_forever
0|chiya | self._run_once()
0|chiya | File "/usr/lib/python3.8/asyncio/base_events.py", line 1859, in _run_once
0|chiya | handle._run()
0|chiya | File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run
0|chiya | self._context.run(self._callback, *self._args)
0|chiya | File "/home/snaacky/.local/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
0|chiya | await coro(*args, **kwargs)
0|chiya | File "/home/snaacky/Chiya/cogs/listeners/member_updates.py", line 79, in on_member_remove
0|chiya | log.info(f'{member} has left {member.guild.name}.')
0|chiya | Message: 'Sh\u014dto#6905 has left /r/animepiracy.'```
--- Logging error ---
0|chiya | Traceback (most recent call last):
0|chiya | File "/usr/lib/python3.8/logging/__init__.py", line 1084, in emit
0|chiya | stream.write(msg + self.terminator)
0|chiya | UnicodeEncodeError: 'latin-1' codec can't encode character '\U0001f62d' in position 88: ordinal not in range(256)
0|chiya | Call stack:
0|chiya | File "/home/snaacky/Chiya/chiya.py", line 56, in <module>
0|chiya | bot.run(config.token)
0|chiya | File "/home/snaacky/.local/lib/python3.8/site-packages/discord/client.py", line 708, in run
0|chiya | loop.run_forever()
0|chiya | File "/usr/lib/python3.8/asyncio/base_events.py", line 570, in run_forever
0|chiya | self._run_once()
0|chiya | File "/usr/lib/python3.8/asyncio/base_events.py", line 1859, in _run_once
0|chiya | handle._run()
0|chiya | File "/usr/lib/python3.8/asyncio/events.py", line 81, in _run
0|chiya | self._context.run(self._callback, *self._args)
0|chiya | File "/home/snaacky/.local/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
0|chiya | await coro(*args, **kwargs)
0|chiya | File "/home/snaacky/Chiya/cogs/listeners/message_updates.py", line 36, in on_message_delete
0|chiya | log.info(f"{message.author} was deleted: {message.clean_content}")
0|chiya | Message: 'Snaacky#0001 was deleted: \U0001f62d'
and so on.
Describe the bug
Attempting to list the existing reminders of a user by using !remind list
results in an error.
To Reproduce
!remind list
Expected behavior
Existing reminders to be listed in an embed, if nothing exists, embed must display that accordingly.
Screenshots
Error message:
CommandInvokeError: Command raised an exception: TypeError: an integer is required (got type str)
At the moment, Chiya put the user's nickname in the embed, making impossible to search the user with CTRL+F, Because people change nickname all the time, the idea is to put the user id in the footer of the embed, so we can search with the User_ID
Describe the bug
When the privatebin is unavailable, tickets are unable to be closed, and manual unmutes are not possible (mute channel doesn't get deleted)
To Reproduce
Steps to reproduce the behavior:
/close
it, or manually unmute a muted memberExpected behavior
For this error to be handled cleanly (display an error), or the chat logs be uploaded to an alternate bin, or added in the mute log/ticket log embed itself.
Problem:
i just tried to create a reminder in 10 seconds, lt started a countdown from 10 to 0, and then it started from 0 to... loop?
How to reproduce the error:
/reminder create duration: 10s message: test
Describe the bug
Error occurs when a user with DMs disabled tries to open a modmail ticket
To Reproduce
Steps to reproduce the behavior:
Additional context
2021-06-08 09:09:26 | root | INFO | Snaacky#0001 tried to create a new pending ticket but is not accepting DMs.
Ignoring exception in on_raw_reaction_add
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "/app/cogs/listeners/message_updates.py", line 152, in on_raw_reaction_add
await tickets.process_embed_reaction(payload)
File "/app/handlers/tickets.py", line 52, in process_embed_reaction
dm_embed_id=dm.id, timestamp=int(time.time()), ticket_topic=None, log_url=None
AttributeError: 'NoneType' object has no attribute 'id'
Describe the bug
Mute channels cannot be closed if the user leaves the server
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Needs some sort of way to close mute channels when users leave the server.
Chiya currently suffers from not having any sort of consistent commit message style/format resulting in a mix of long and verbose git commit messages that overly explain themselves and others that are merely a few words long and require you to actually view the code changes to see what was changed.
I am recommending that we switch over to a consistent commit message style and enforce it for the project so that there is consistency across the git commit log.
My personal recommendation is: https://www.conventionalcommits.org/en/v1.0.0/
Most functions do not currently have docstrings and typing is inconsistent throughout the project.
Despite being declared in the Docker environment variables in the README, the log level relies on config.py
, needs to be fixed.
The default docker-compose.yml
will always pull from latest (master branch) and not build the source. Add an additional docker-compose.yml
to build from source and add a section to the README about it.
Right now, there isn't many options when creating new GitHub issues and the current templates are too verbose.
I recommend migrating the system to:
and slimming down the templates for each so it's not such a chore to create new issues.
It may be also worth considering opening up GitHub Discussions for the repository although I imagine that most discussion will occur on Discord.
Reminders lasting weeks/months are currently hard to set due to it currently only accepting hours/minutes/seconds, so add support for those.
The current labels used for the GitHub project are a mix of the standard labels which are mostly useless and a bunch of random labels that have been added as needed overtime without any consistency. I am recommending that we try to find a pre-existing set of labels that will better meet our projects needs and go with them.
After some rudimentary research, I found myself interested with these but am open to hear any feedback: https://seantrane.com/posts/logical-colorful-github-labels-18230/
Noticed this popping up the logs after the recent Discord-Epic nitro boost giveaway, have not investigated the cause yet:
Ignoring exception in on_guild_update
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/discord/client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "/app/cogs/listeners/guild_updates.py", line 223, in on_guild_update
await boosts.on_removed_boost(before, after)
File "/app/handlers/boosts.py", line 35, in on_removed_boost
nitro_logs = discord.utils.get(after.guild.channels, id=config.nitro_logs)
AttributeError: 'Guild' object has no attribute 'guild'
When attempting to open a ticket using /ticket open
, the option is greyed-out, and fails to execute.
To Reproduce
Steps to reproduce the behavior:
/ticket open
Expected behavior
A modmail ticket must be opened and the user notified about it.
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.