dashwav / nano-chan Goto Github PK
View Code? Open in Web Editor NEWGeneral purpose discord bot written in python with the discord.py library. Base of Yinbot
License: MIT License
General purpose discord bot written in python with the discord.py library. Base of Yinbot
License: MIT License
With the added feature of collapsible embeds, you can potentially remove reports with no way of recovery (thanks discord). a new function or extension of an existing function would be good like -report #
or something along those lines.
should be fairly easy
Print isn't how we should be logging errors and such, ideally we should be replacing all of the print
statements with logger
(self.logger
) statements
I would like to move Nano over to github actions
Honestly just copying over from https://github.com/dashwav/animecalendarbot/blob/master/.github/workflows/ci-workflow.yml would be fine for this
https://github.com/dashwav/nano-chan/blob/master/cogs/janitor.py#L74
Just need to add dedicated/limited here - might also change format to
Roles = [
artsy,
etc,
...
]
After some recent spammy events will probably be good to add the ability for bot owner to ban users botwide.
It actually might work but I am assuming it doesn't because the readme mentions yin
Nano seems to be having issues tracking emojis.
This seems to be the exception she is throwing which is the reaction tracking.
Related function : https://github.com/dashwav/nano-chan/blob/master/cogs/stats.py#L47
Sep 17 10:43:42 home1 python[12544]: Ignoring exception in raw_reaction_add
Sep 17 10:43:42 home1 python[12544]: Traceback (most recent call last):
Sep 17 10:43:42 home1 python[12544]: File "/home/deploy/.pyenv/versions/spoilerbot/lib/python3.6/site-packages/discord/client.py", line 221, in _run_event
Sep 17 10:43:42 home1 python[12544]: await coro(*args, **kwargs)
Sep 17 10:43:42 home1 python[12544]: TypeError: on_raw_reaction_add() missing 3 required positional arguments: 'message_id', 'channel_id', and 'user_id'
Some things in the stats file can be spedup with even simple vectorized list comprehension casting and in
operator
One example is https://github.com/dashwav/nano-chan/blob/master/cogs/stats.py#L38
Made this issue to remind myself later.
Quite a few times now there has been a log about reaction spamming, and always it seems to be someone who has only reacted once or twice. Need to look into this.
https://github.com/dashwav/nano-chan/blob/master/cogs/channels.py#L246
Notes
L246: reacts is the integer returned from the DB which is supposed to be a count of all reaction in the last 24 hours
L247: if the reacts returned is 10, 25, or 100 - send a message to the mod channel
Do this to prevent pings since embeds don't actually ping iirc
User flow:
Enable for account on bot
(Set emoji to track default:hearto)
on_raw_reaction_add() -> save image and send to user directly in DMs
DB to track who has feature enabled and how often they are using it
Frustrating to find the ID of someone who made a report and is spamming, it should be in the footer maybe with the report ID
throughout the code we are calling self.postgres_controller
, this is super long and makes it hard to be flake8 compliant, we should go through and rename all instances of this to self.pg_controller
User Story:
As a moderator of the discord server
I want a timed out user to have no access to any other channels than #timeout
So that I can ensure that I have the user's undivided attention
And for long time timeout users to be fully removed from any aspect of the server
Overview
When a moderator goes to time a user out, they should be able to do so via a command just like a kick or a ban (.timeout @username
). This command should do the following things:
There should also be a .untimeout @username
command to reverse these three steps.
Probably wanna bump the psql and python versions in the unit testing. Also probably should migrate the timeout command to something a little more robust similar to https://stackoverflow.com/questions/687948/timeout-a-command-in-bash-without-unnecessary-delay
Instead of removing the users from the role, make a duplicate of the role permissions, colour, and name, record all members in that role to a list, remove the old role and insert all the new values. Then make a set of that list and loop through it adding the
This would go from 2 api request per member per role (both reward and colour) to 5 api request per reward + colour role + 1 per member in the reward system. Should be more efficient. I wish there was a better way to mass apply the key roles to people as that is the main slowdown now.
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.