Giter Club home page Giter Club logo

chiya's People

Contributors

a1icja avatar combe15 avatar dependabot[bot] avatar devcutler avatar kapppa avatar lunarmint avatar munchipo avatar qlunar avatar r3d4c13d avatar r3d4cted avatar ravencentric avatar snaacky avatar y0usef-2e avatar yasamato 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

Watchers

 avatar  avatar  avatar  avatar  avatar

chiya's Issues

App directory reports not working

The option to report a specific message with Chiya through the app directory is currently greyed out for users.

Current output:
image


Expected output:
image

[BUG] The bot doesn't handle other character encodings

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:

  1. Add a character like "เถž" to your name
  2. Try warning yourself

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.

[BUG] Reminder listing feature does not work.

Describe the bug
Attempting to list the existing reminders of a user by using !remind list results in an error.

To Reproduce

  1. Type !remind list
    Error occurs.

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)

Feat: add user id in the footer of embed in joyboard

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

[BUG] Ticket closes and manual unmutes don't work when the specified privatebin is down

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:

  1. Bring down the specified privatebin/enter an invalid URL for privatebin
  2. Try to open a ticket and then /close it, or manually unmute a muted member
  3. Command fails (defers indefinitely)

Expected 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.

Bug: endless reminder if you put 10s as duration

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

[BUG] Error occurs when a user with DMs disabled tries to open a modmail ticket

Describe the bug
Error occurs when a user with DMs disabled tries to open a modmail ticket

To Reproduce
Steps to reproduce the behavior:

  1. Disable DMs under server privacy settings
  2. Attempt to open a modmail

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'

The project currently does not have any consistent commit message format

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/

[TODO] Add building from source docker-compose.yml

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.

[TODO] Improve GitHub issues

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:

  • [TODO]
  • [REQUEST]
  • [BUG]

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.

The project could benefit from new repository labels

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/

[BUG] Bug in logs related to nitro boosting

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'

[BUG] Non-staff users are unable to open tickets.

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:

  1. Get on an alt without the Staff or the Trial Staff role
  2. Attempt to open a ticket using /ticket open

Expected behavior
A modmail ticket must be opened and the user notified about it.

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.