Commit Graph
65 Commits
Author SHA1 Message Date
Kwoth 33dd4bbf0e Merge branch 'make-image-use-safesearch-for-google-images' into 'v3'
Add safesearch to .img when using google

See merge request Kwoth/nadekobot!216
2022-01-05 02:28:58 +00:00
Kwoth 065807c180 Merge branch 'hokutochen-v3-patch-71695' into 'v3'
updated creds.yml example owner ID section

See merge request Kwoth/nadekobot!215
2022-01-05 02:28:18 +00:00
Kwoth 9cd24feccc Merge branch 'hokutochen-v3-patch-15423' into 'v3'
Transferred over VPS guide from 1.9

See merge request Kwoth/nadekobot!214
2022-01-05 02:27:47 +00:00
Kwoth 54a32a5770 Merge branch 'hokutochen-v3-patch-85263' into 'v3'
Omitted comma explanation for multi owner ID section to avoid confusion

See merge request Kwoth/nadekobot!213
2022-01-05 02:26:53 +00:00
Kwoth 71d383c4db Merge branch 'hokutochen-v3-patch-31256' into 'v3'
fixed GoogleApiKey, formatting error, thanks to alaruba for catching the mistake

See merge request Kwoth/nadekobot!212
2022-01-04 06:03:05 +00:00
Kwoth d51d159962 Merge branch 'hokutochen-v3-patch-51803' into 'v3'
added: Enable "custom search api" for GoogleAPIKey section.

See merge request Kwoth/nadekobot!211
2022-01-03 12:09:06 +00:00
Kwoth 8d932d546a Merge branch 'hangman-patch' into 'v3'
small bugfix for hangman

See merge request Kwoth/nadekobot!210
2022-01-03 12:08:41 +00:00
Kwoth 58adaa9110 Merge branch 'hokutochen-v3-patch-89665' into 'v3'
fixed "from source guide" links and "manual prereq" link

See merge request Kwoth/nadekobot!209
2021-12-27 19:10:05 +00:00
Kwoth caca407abd Merge branch 'hokutochen-v3-patch-31383' into 'v3'
fixed error in Source guide (accidentally used quotes)

See merge request Kwoth/nadekobot!208
2021-12-24 22:02:51 +00:00
Kwoth eaea6e3c54 Merge branch 'hokutochen-v3-patch-44970' into 'v3'
Update step 4 of "linux from source" to be more specific.

See merge request Kwoth/nadekobot!206
2021-12-21 20:18:15 +00:00
Kwoth 52b2c0910c Merge branch 'trans-patch' into 'v3'
ToLower for `.trans` language parameters

See merge request Kwoth/nadekobot!205
2021-12-21 01:20:52 +00:00
Kwoth ab5450a125 Merge branch 'hokutochen-v3-patch-59240' into 'v3'
updated "GoogleAPIKey" section

See merge request Kwoth/nadekobot!203
2021-12-21 00:46:13 +00:00
Kwoth bcce32423c Merge branch 'banmsgpatch' into 'v3'
Fix color for ban DMs with plain text ban message.

Closes #324

See merge request Kwoth/nadekobot!204
2021-12-21 00:00:45 +00:00
Kwoth cdc2cc1439 Merge branch 'hokutochen-v3-patch-62793' into 'v3'
fixed broken "Enter your bot's token" link in "linux release" portion

See merge request Kwoth/nadekobot!202
2021-12-19 01:12:47 +00:00
Kwoth 12a64c4c4d Merge branch 'xpstrspatch' into 'v3'
Update xpex channel to use the right string

See merge request Kwoth/nadekobot!201
2021-12-18 21:11:06 +00:00
Kwoth d922120f58 Merge branch 'transpatch' into 'v3'
Small `.trans` fixes

See merge request Kwoth/nadekobot!200
2021-12-18 21:10:06 +00:00
Kwoth ccdf0fc077 Merge branch 'hokutochen-v3-patch-43568' into 'v3'
separated "cd output && cp creds_example.yml creds.yml"

See merge request Kwoth/nadekobot!199
2021-12-18 21:09:16 +00:00
Kwoth 6c9f231453 Update responses.nl-NL.json (POEditor.com) 2021-12-15 19:09:59 +00:00
Kwoth 58b22e3d9e Merge branch 'award-patch' into 'v3'
Award no longer misinterprets IDs

See merge request Kwoth/nadekobot!195
2021-12-13 13:11:56 +00:00
Kwoth c85bdec396 Merge branch 'qdel-patch' into 'v3'
Clarity on qdel

See merge request Kwoth/nadekobot!197
2021-12-13 13:07:00 +00:00
Kwoth 8eaaa35c7a Merge branch 'perm-patch' into 'v3'
Replace `RequireUserPemission` with `UserPerm`

See merge request Kwoth/nadekobot!196
2021-12-13 13:06:28 +00:00
Kwoth a9ec8049f6 Update responses.id-ID.json (POEditor.com) 2021-12-11 01:04:37 +00:00
Kwoth ced0d97e3a Update responses.pt-BR.json (POEditor.com) 2021-12-11 00:37:34 +00:00
Kwoth 24d0f57dc3 Update responses.pl-PL.json (POEditor.com) 2021-12-11 00:37:33 +00:00
Kwoth 514ecd6be8 Update responses.fr-FR.json (POEditor.com) 2021-12-11 00:37:32 +00:00
Kwoth 8b410561f9 Update responses.uk-UA.json (POEditor.com) 2021-12-09 01:04:48 +00:00
Kwoth 3c79fd1d6f Update responses.es-ES.json (POEditor.com) 2021-12-09 01:04:46 +00:00
Kwoth e9f1a9b1dd Update responses.ru-RU.json (POEditor.com) 2021-12-09 01:04:45 +00:00
Kwoth 3c293ae6db Update responses.pt-BR.json (POEditor.com) 2021-12-09 01:04:43 +00:00
Kwoth a5d9e7de66 Update responses.de-DE.json (POEditor.com) 2021-12-09 01:04:42 +00:00
Kwoth 4d9e48cd41 Update responses.fr-FR.json (POEditor.com) 2021-12-09 01:04:42 +00:00
Kwoth 57996ba290 Merge branch 'take-award-patch' into 'v3'
Change award and take to not use ShmartNumber

See merge request Kwoth/nadekobot!192
2021-11-21 01:37:30 +00:00
Kwoth 54ac955395 Merge branch 'xpservicepatch' into 'v3'
Remove deprecated method from XpService.

See merge request Kwoth/nadekobot!191
2021-11-21 01:09:45 +00:00
Kwoth f4fa298866 Merge branch 'plantpatch' into 'v3'
ShmartNumber for .plant

See merge request Kwoth/nadekobot!193
2021-11-21 01:09:14 +00:00
Kwoth b2fafc964f Merge branch 'v3' into 'v3'
Move plant/pick where they belong

See merge request Kwoth/nadekobot!178
2021-11-21 01:08:46 +00:00
Kwoth e37d1c46db Merge branch 'patreon-token-refresh' into 'v3'
Patreon Access and Refresh Tokens should now be automatically updated

See merge request Kwoth/nadekobot!189
2021-11-17 18:45:50 +00:00
Kwoth 06c20c6fa4 Patreon Access and Refresh Tokens should now be automatically updated 2021-11-17 18:45:49 +00:00
Kwoth d55ce7accc Merge branch 'massban2' into 'v3'
Add an audit log reason to massban

See merge request Kwoth/nadekobot!188
2021-11-14 23:41:04 +00:00
Kwoth ee5c13607b Add support for hackbans on massban
Closes #307

See merge request Kwoth/nadekobot!187
2021-11-13 20:38:01 +00:00
Kwoth c8e01bd158 Merge branch 'rerorace' into 'v3'
Fix possible race condition for reaction roles

### Description  
This MR aims to fix a possible race condition on the addition of exclusive reaction roles when the reactions are spammed by the user.

### Changes Proposed  
- Add a `ConcurrentHashSet<(ulong, ulong)>` to keep track of exclusive reaction roles that are being processed.
- Added logic that takes the collection above in consideration.
    - If entry is present, quit silently.
    - Else, perform the reaction role stuff then remove the entry.

### Details  
Exclusive reaction roles are meant to be exactly that - exclusive.

Normally, when a user selects an exclusive role they receive that role. If they select another role, their previous role is removed and the new one is added. There is a bug where if the user spams the reactions for a short period of time, Nadeko will eventually assign them multiple roles that are meant to be exclusive with each other. This happens because the events that handle the addition and removal work in a weird way - first they offload the removal of the roles to a `Task.Run()`, which also happens to have a `Task.Delay()` in it (possibly to avoid Discord ratelimits).

Concurrently, it proceeds to add the role that the user picked. The problem with this approach is that the Task that handles the role removal takes long enough for another reaction event to trigger and start the same work for a different reaction role. Then mayhem ensues, with different events concomitantly adding and removing the roles that previous events have removed or added. In the end, the user ends up with multiple exclusive roles they are not supposed to.

This MR fixes this by having a local field that keeps track of the reaction roles that are being currently processed (a `ConcurrentHashSet<T>` where T is a tuple `(ulong, ulong)` - (message ID, user ID)). When a reaction event runs, it adds itself to the concurrent hashset. If another event triggers and tries to add itself while the previous event still hasn't finished, it silently quits so it doesn't interfere with the current event. I was not entirely satisfied with the way this works, so I tried another system that cancels the old events (with a CancellationToken) instead of just making the new events quit, but that resulted in multiple exclusive roles being temporarily assigned to the user (just for a few seconds, but still).

If another approach is preferred, then please do let me know.

### Notes  
- Methods in that entire file need to be broken down into smaller methods.
- The loop that removes old reactions is **very slow**. Using `Task.WhenAll()` instead of awaiting the removals could help improve performance (but could also trigger ratelimits).

See merge request Kwoth/nadekobot!183
2021-11-09 10:41:49 +00:00
Kwoth 02c7ded457 Merge branch 'hokutochen-v3-patch-18181' into 'v3'
Fixed broken link

See merge request Kwoth/nadekobot!185
2021-11-09 08:32:37 +00:00
Kwoth 2a4d55f81d Merge branch 'v3-dev' into 'v3'
Slots redesign nad images moved to images.yml

See merge request Kwoth/nadekobot!181
2021-11-03 14:22:51 +00:00
Kwoth d090aa23ee Slots redesign nad images moved to images.yml 2021-11-03 14:22:51 +00:00
Kwoth 65062306c6 Merge branch 'tbodt-v3-patch-66982' into 'v3'
Reduce required permissions for deleting quotes

See merge request Kwoth/nadekobot!182
2021-10-30 11:54:03 +00:00
Kwoth c4ba43ec6d Merge branch 'v3-dev' into 'v3'
backport of public nsfw module

See merge request Kwoth/nadekobot!176
2021-10-21 23:35:58 +00:00
Kwoth 1141791ce5 backport of public nsfw module 2021-10-21 23:35:58 +00:00
Kwoth 49f1ef7db0 Merge branch 'hokutochen-v3-patch-79292' into 'v3'
Updated images for V3 updater

See merge request Kwoth/nadekobot!179
2021-10-21 23:35:11 +00:00
Kwoth b61b1dbfaa Merge branch 'memfix' into 'v3'
Fixed memory counter not refreshing over time

See merge request Kwoth/nadekobot!177
2021-10-17 22:56:10 +00:00
Kwoth 24a4745193 Merge branch 'v3-dev' into 'v3'
Created VotesApi project nad re-worked vote rewards handling

See merge request Kwoth/nadekobot!172
2021-10-15 22:06:30 +00:00
Kwoth 1af75fd813 Created VotesApi project nad re-worked vote rewards handling 2021-10-15 22:06:30 +00:00
Kwoth 18160164eb Merge branch 'memsize' into 'v3'
Corrected memory usage on StatusService

See merge request Kwoth/nadekobot!175
2021-10-15 22:04:30 +00:00
Kwoth 6ada15049d Merge branch 'ban-kick-patch' into 'v3'
TrimTo to avoid length limit for ban/kick reasons

See merge request Kwoth/nadekobot!174
2021-10-13 17:51:08 +00:00
Kwoth 34201f0558 Merge branch 'v3' into 'v3'
Docs fix

See merge request Kwoth/nadekobot!168
2021-10-09 17:43:18 +00:00
Kwoth b41c014869 Merge branch 'Kieteyuku-v3-patch-34025' into 'v3'
Use … in TrimTo to decrease necessary deletions

See merge request Kwoth/nadekobot!171
2021-10-09 17:42:24 +00:00
Kwoth d5c94424e9 Merge branch 'v3-docker' into 'v3'
install youtube-dl through pip for a better availability of cdn

See merge request Kwoth/nadekobot!165
2021-10-01 08:26:15 +00:00
Kwoth 39f01a3164 Merge branch 'v3-dev' into 'v3'
Hangman Rewrite

See merge request Kwoth/nadekobot!164
2021-09-27 02:00:19 +00:00
Kwoth 486916944b Hangman Rewrite 2021-09-27 02:00:19 +00:00
Kwoth 68e96cd1bb Merge branch 'v3-docker' into 'v3'
V3 docker

See merge request Kwoth/nadekobot!163
2021-09-27 00:10:18 +00:00
Kwoth 9011646b02 Update responses.pt-BR.json (POEditor.com) 2021-09-16 17:09:46 +00:00
Kwoth cb514e4219 Update responses.es-ES.json (POEditor.com) 2021-09-14 23:29:46 +00:00
Kwoth cea944cdb8 Update responses.uk-UA.json (POEditor.com) 2021-09-13 15:42:50 +00:00
Kwoth 2d70ea487e Update responses.ru-RU.json (POEditor.com) 2021-09-13 15:42:49 +00:00
Kwoth 9f65f979fd Update responses.fr-FR.json (POEditor.com) 2021-09-13 15:42:48 +00:00
Kwoth 9396f59a34 Update responses.de-DE.json (POEditor.com) 2021-09-12 17:58:57 +00:00
Kwoth 20a7e03c9e Fixes for .gitlab-ci.yml 2021-09-06 21:34:54 +02:00