Commit graph

161 commits

Author SHA1 Message Date
787eb347f6
Changed Tenor API url, account for ratelimits, switch Member#permission to Member#permissions 2021-05-14 09:31:12 -05:00
79bc36759c
Added support for DEBUG environment variable with image runner, make freeze use a similar method to speed 2021-05-13 17:11:13 -05:00
61758fa3bb
Pass an image buffer into the native functions instead of a URL 2021-05-11 14:25:02 -05:00
d5c7b38b57
None of these were needed in the first place 2021-05-11 12:11:54 -05:00
c4b57ac617 Re-add a form of size limit 2021-05-11 11:22:27 -05:00
364d8bf006 Made command outputs post as replies, fixed status changing on cluster restart, extra stuff 2021-05-11 11:12:01 -05:00
2b810c7c86 Re-add image job timeout, split dockerfiles, removed api from docker-compose, more fixes 2021-05-10 22:59:19 -05:00
198b6dbcac Fixed potential issue where all jobs could be deleted 2021-05-06 16:58:35 -05:00
e8834c072a Properly handle closing an image server connection, switch some "on" instances to "once" 2021-05-06 16:40:05 -05:00
8e7764fc57 Add extra giphy media URL 2021-05-06 16:12:44 -05:00
e5d9388952 Added command counts to Prometheus metrics 2021-05-03 08:49:55 -05:00
56113a1cf8 Fixed some DM command issues, made reload and restart use IPC 2021-04-30 12:31:53 -05:00
19922858f2 Fixed some issues regarding eris-sharder and newer eris versions 2021-04-29 16:56:32 -05:00
6cecd4b9d6 Make all native image functions synchronous 2021-04-24 17:54:47 -05:00
ebfab817d7 Added support for multiple processing emojis, fixed issue with local image processing 2021-04-23 15:03:48 -05:00
b5253cf8e3 Potential giphy fix 2021-04-21 17:37:05 -05:00
2a22c73654 Made image detection start with replies 2021-04-19 22:06:40 -05:00
7db1aa880c Added argument support to slow/speed, made video detection also detect images 2021-04-19 20:15:32 -05:00
e00671f0d5 Added argument to freeze for setting the end frame, speed is now aware of variable framerates 2021-04-19 11:04:24 -05:00
c67499af9d Added initial support for detecting videos, prevent music messages from showing on soundboard commands, fixed(?) permission checking 2021-04-19 09:31:39 -05:00
7cc8ac7b6b Reduced prefix/disabled channel cache to 512, made API delete images if they haven't been requested after 5 minutes 2021-04-14 18:02:03 -05:00
cc82d32840 Fixed slow, changed clean to handle all env variables, changed database handling 2021-04-14 16:37:40 -05:00
40223ec8b5
Class commands, improved sharding, and many other changes (#88)
* Load commands recursively

* Sort commands

* Missed a couple of spots

* missed even more spots apparently

* Ported commands in "fun" category to new class-based format, added babel eslint plugin

* Ported general commands, removed old/unneeded stuff, replaced moment with day, many more fixes I lost track of

* Missed a spot

* Removed unnecessary abort-controller package, add deprecation warning for mongo database

* Added imagereload, clarified premature end message

* Fixed docker-compose path issue, added total bot uptime to stats, more fixes for various parts

* Converted image commands into classes, fixed reload, ignore another WS event, cleaned up command handler and image runner

* Converted music/soundboard commands to class format

* Cleanup unnecessary logs

* awful tag command class port

* I literally somehow just learned that you can leave out the constructor in classes

* Pass client directly to commands/events, cleaned up command handler

* Migrated bot to eris-sharder, fixed some error handling stuff

* Remove unused modules

* Fixed type returning

* Switched back to Eris stable

* Some fixes and cleanup

* might wanna correct this

* Implement image command ratelimiting

* Added Bot token prefix, added imagestats, added running endpoint to API
2021-04-12 11:16:12 -05:00
48fb0c98c8 Fixed postgres not properly getting command count on newly registered commands 2021-03-31 22:16:23 -05:00
4fb379474b Port pagination fix from class-commands, replaced a playing message 2021-03-30 17:00:07 -05:00
162bc7c093 I literally can not fix pagination 2021-03-19 15:10:15 -05:00
07e1fa8dc2 Allow user/reply mentions 2021-03-18 21:24:37 -05:00
9f300f763a Switch to postgres in docker compose 2021-03-18 11:19:08 -05:00
5d2e2b5274 Upgraded retrotext and DBL posting packages, fixed mention prefixes and DM commands 2021-03-18 09:29:03 -05:00
03ddf5c88c Fixed mention prefix 2021-03-16 15:45:10 -05:00
b0313bc041 wow thanks eris for not blocking these by default 2021-03-16 10:33:16 -05:00
4c83c55344 supposedly async promises are bad lmao 2021-03-15 22:29:48 -05:00
03aa3b3a2b Removed Twitter bot 2021-03-08 10:37:43 -06:00
7cf9bcca4e write stable audio queue code challenge (instantly failed) 2021-03-05 22:13:58 -06:00
4419d73d97 soundplayer crash prevention 2021-03-05 15:32:37 -06:00
f6bec828d7 Fixed database thing 2021-03-05 15:20:15 -06:00
f0c685d8c4 Make soundreload more useful 2021-03-05 15:13:54 -06:00
2499fb2a3b Don't rely on lavacord eris helper package, another pagination fix attempt, make cowsay use a different lib 2021-03-05 12:06:22 -06:00
4d5ef3c24f Added edit date to help page, fixed image command quote 2021-03-04 22:33:03 -06:00
e7ffa23411 Some assorted fixes 2021-02-07 11:08:55 -06:00
adroitwhiz
7167956a76
Stop using ffprobe to read GIF frame delay (#57)
* Stop using ffprobe to read GIF delay

* Default image delay to 0
2021-01-26 20:30:04 -06:00
62346cbae4 Rework image API again, replaced many calls to replace with replaceAll 2021-01-18 14:11:28 -06:00
b2b8fd643a Add proper support for gfycat gifs, attempt to handle image errors "better", added some new activity messages 2021-01-17 20:40:52 -06:00
116ed94ca3 Attempt to fix a crash with pagination reaction removal 2021-01-16 23:46:07 -06:00
adroitwhiz
3de4858b5a
Clean up image API code paths (#49)
* Document image.js a bit

* Close image.js sockets in all code paths

I'm not sure whether sockets get GC'd when the function returns

* Remove getFormat

It was only called from one place, and the object property names were
quite confusing

* Clean up image.js conditional a bit

I had to write out an entire truth table for this and work it all out
Thinking hard

* Move actual ImageMagick calling into separate file

This gets rid of the weird, brain-melting ouroboros of code that
recurses across threads and processes.

* Reduce amount of getType wrangling

This amounted to an awful lot of dead conditionals after the image
commands were all modified to pass in image types anyway. This has also
led to two different implementations diverging, which causes bugs like
GIF commands applied to non-GIFs erroring instead of providing a
user-friendly message.

* Unify image-runner return type, clarify image type

This allows us to remove the fromAPI parameter from image-runner, and
helps greatly clarify the behavior around image types.

* Deduplicate GIF code, fix "not a GIF" handling

The special "nogif" value is now stored as the image type instead of its
value, as the value must always be a Buffer now--no loosely-typed
shenanigans.
2021-01-09 19:50:29 -06:00
c2bd68263b Made image API node chooser sort by job amount instead of CPU usage, added soundreload 2021-01-08 12:08:10 -06:00
55da0db479 The image API no longer uses a unique thread for each job (due to image processing using its own thread anyway), added dummy DB driver 2021-01-06 16:10:31 -06:00
9f2bd1fecb Make the bot itself get the image file type again 2021-01-04 20:53:34 -06:00
87e2e56ef0 Fixed help page generator still attempting to register moderation commands 2021-01-04 14:35:24 -06:00
2a3f84f628 Properly request only the first 1024 bytes when getting image type 2021-01-04 11:10:57 -06:00