Kwoth
ea8e444b10
Trivia game cleanup
2022-07-11 23:11:45 +00:00
Kwoth
8efdd3dffe
Merge branch 'hokutochen-v4-patch-33031' into 'v4'
...
added redis as optional to install in windows guide docs
See merge request Kwoth/nadekobot!258
2022-07-09 22:51:37 +00:00
Kwoth
4bb4209c92
Merge branch 'inner-xp-loop-rewrite' into 'v4'
...
Rewrite xp gain loop to be faster
See merge request Kwoth/nadekobot!253
2022-07-07 17:09:11 +00:00
Kwoth
744018802f
Rewrite xp gain loop. Hopefully faster and fixes xp freeze bugs.
2022-07-07 17:09:11 +00:00
Kwoth
4752c4b7cd
Update CHANGELOG.md
2022-06-26 08:54:40 +00:00
Kwoth
e2477638b5
Merge branch 'nonblocking-dict' into 'v4'
...
Replaced all usages of ConcurrentDictionary with NonBlocking.ConcurrentDictionary
See merge request Kwoth/nadekobot!256
2022-06-24 08:37:25 +00:00
Kwoth
f398cddaf0
Replaced all usages of ConcurrentDictionary with NonBlocking.ConcurrentDictionary
2022-06-24 08:37:25 +00:00
Kwoth
dbbdc66dca
Merge branch 'eval' into 'v4'
...
Added .eval command. Very dangerous, don't use.
See merge request Kwoth/nadekobot!254
2022-06-23 13:19:41 +00:00
Kwoth
df85b3b250
Added .eval command. Very dangerous, don't use.
2022-06-23 13:19:41 +00:00
Kwoth
f1d9db699f
Merge branch 'v4-noredis' into 'v4'
...
Abstract away cache. 2 implementations: redis and memory
See merge request Kwoth/nadekobot!255
2022-06-23 13:07:47 +00:00
Kwoth
210da263ad
Abstract away cache. 2 implementations: redis and memory
2022-06-23 13:07:45 +00:00
Kwoth
34c96c697a
Merge branch 'hokutochen-v4-patch-06658' into 'v4'
...
updating docs and some code
See merge request Kwoth/nadekobot!250
2022-06-16 15:56:30 +00:00
Kwoth
6bc2fc88f9
Update responses.uk-UA.json (POEditor.com)
2022-06-14 11:34:10 +00:00
Kwoth
69b6ed6a49
Update responses.es-ES.json (POEditor.com)
2022-06-14 11:34:09 +00:00
Kwoth
e30b126726
Update responses.ru-RU.json (POEditor.com)
2022-06-14 11:34:08 +00:00
Kwoth
a5e2321c5b
Update responses.pt-BR.json (POEditor.com)
2022-06-14 11:34:07 +00:00
Kwoth
322e9a329d
Update responses.pl-PL.json (POEditor.com)
2022-06-14 11:34:06 +00:00
Kwoth
7ca6ab8562
Update responses.it-IT.json (POEditor.com)
2022-06-14 11:34:05 +00:00
Kwoth
8a27dcc481
Update responses.id-ID.json (POEditor.com)
2022-06-14 11:34:03 +00:00
Kwoth
bed61c521f
Update responses.de-DE.json (POEditor.com)
2022-06-14 11:34:02 +00:00
Kwoth
46ea1698eb
Update responses.fr-FR.json (POEditor.com)
2022-06-14 11:34:01 +00:00
Kwoth
c47417024d
Update responses.nl-NL.json (POEditor.com)
2022-06-14 11:34:00 +00:00
Kwoth
eedc2d05ff
Update responses.zh-TW.json (POEditor.com)
2022-06-14 11:33:59 +00:00
Kwoth
d24dba7ed0
Update responses.zh-CN.json (POEditor.com)
2022-06-14 11:33:58 +00:00
Kwoth
9bdf58ec27
Update responses.ar.json (POEditor.com)
2022-06-14 11:33:56 +00:00
Kwoth
1f51c54449
Merge branch 'v4-prem' into 'v4'
...
NadekoBot Patronage system, Search commands improvements + fixes
See merge request Kwoth/nadekobot!252
2022-06-14 07:24:34 +00:00
Kwoth
7b5145f116
NadekoBot Patronage system, Search commands improvements + fixes
2022-06-14 07:24:33 +00:00
Kwoth
18b10b8c6f
Merge branch 'hokutochen-v4-patch-19985' into 'v4'
...
Updated Docs regarding source and expressions along with help text
See merge request Kwoth/nadekobot!247
2022-05-27 23:55:57 +00:00
Kwoth
7cbedc82bf
Merge branch 'fix/docker' into 'v4'
...
Reduce Docker image size
See merge request Kwoth/nadekobot!249
2022-05-26 15:11:52 +00:00
Kwoth
615e1dd044
Merge branch 'v4-dev' into 'v4'
...
Medusa System Added
Read about the medusa system [here](https://nadekobot.readthedocs.io/en/latest/medusa/creating-a-medusa/ )
See merge request Kwoth/nadekobot!239
2022-04-16 12:44:46 +00:00
Kwoth
7cb15f5278
Medusa System Added
...
Read about the medusa system [here](https://nadekobot.readthedocs.io/en/latest/medusa/creating-a-medusa/ )
2022-04-16 12:44:46 +00:00
Kwoth
cbe617bc59
Merge branch 'v4' into 'v4'
...
fix docker volume
See merge request Kwoth/nadekobot!246
2022-04-12 22:05:40 +00:00
Kwoth
e4b98a0c07
Merge branch 'v4-db' into 'v4'
...
WIP db provider support for Mysql and Postgres
See merge request Kwoth/nadekobot!245
2022-04-11 10:41:26 +00:00
Kwoth
e23233ee06
WIP db provider support for Mysql and Postgres
2022-04-11 10:41:26 +00:00
Kwoth
0e555a4ed7
Update responses.uk-UA.json (POEditor.com)
2022-03-26 16:16:23 +00:00
Kwoth
a6a1d8cb6f
Update responses.es-ES.json (POEditor.com)
2022-03-26 16:16:22 +00:00
Kwoth
6595c3a43d
Update responses.ru-RU.json (POEditor.com)
2022-03-26 16:16:21 +00:00
Kwoth
77bb5724d8
Update responses.pt-BR.json (POEditor.com)
2022-03-26 16:16:20 +00:00
Kwoth
48ea595136
Update responses.pl-PL.json (POEditor.com)
2022-03-26 16:16:19 +00:00
Kwoth
1068457584
Update responses.it-IT.json (POEditor.com)
2022-03-26 16:16:18 +00:00
Kwoth
eca7973266
Update responses.id-ID.json (POEditor.com)
2022-03-26 16:16:17 +00:00
Kwoth
46ba2df0b8
Update responses.de-DE.json (POEditor.com)
2022-03-26 16:16:17 +00:00
Kwoth
a8f9a6e439
Update responses.fr-FR.json (POEditor.com)
2022-03-26 16:16:16 +00:00
Kwoth
cca5b5d41b
Update responses.nl-NL.json (POEditor.com)
2022-03-26 16:16:15 +00:00
Kwoth
3d456e5c14
Merge branch 'hokutochen-v4-patch-80574' into 'v4'
...
updating guide for twitch client secret
See merge request Kwoth/nadekobot!235
2022-03-21 15:30:21 +00:00
Kwoth
72b3565e2e
Merge branch 'hokutochen-v4-patch-55285' into 'v4'
...
Updated tmux guide
See merge request Kwoth/nadekobot!243
2022-03-21 15:29:55 +00:00
Kwoth
4190f07d9c
Merge branch 'eDavid-v4-patch-48565' into 'v4'
...
python3 folder is up to 3.9 now
See merge request Kwoth/nadekobot!241
2022-03-18 18:14:04 +00:00
Kwoth
1913cd4309
Merge branch 'hokutochen-v4-patch-69894' into 'v4'
...
wremoved "and when queue is empty" from .qap description.
See merge request Kwoth/nadekobot!238
2022-03-15 09:30:51 +00:00
Kwoth
3e14dc22cb
Merge branch 'hokutochen-v4-patch-80313' into 'v4'
...
incorrect bot version (we are on 4.0.4)?
See merge request Kwoth/nadekobot!236
2022-03-15 00:00:17 +00:00
Kwoth
f4178aeacd
Merge branch 'ban=patch' into 'v4'
...
Fix ban dms sending to mod. Closes #340
Closes #340
See merge request Kwoth/nadekobot!237
2022-03-14 23:59:55 +00:00
Kwoth
50a4497532
Update CHANGELOG.md
2022-03-03 23:32:05 +00:00
Kwoth
c3d6183d73
Update CHANGELOG.md
2022-03-03 23:30:44 +00:00
Kwoth
0fa2b7d171
Update responses.ar.json (POEditor.com)
2022-02-18 16:49:12 +00:00
Kwoth
bb90cdc3c9
Update responses.uk-UA.json (POEditor.com)
2022-02-18 16:49:11 +00:00
Kwoth
c89a5789e6
Update responses.es-ES.json (POEditor.com)
2022-02-18 16:49:10 +00:00
Kwoth
ad2c0033df
Update responses.ru-RU.json (POEditor.com)
2022-02-18 16:49:09 +00:00
Kwoth
0f9037b228
Update responses.pt-BR.json (POEditor.com)
2022-02-18 16:49:08 +00:00
Kwoth
4fc377686b
Update responses.pl-PL.json (POEditor.com)
2022-02-18 16:49:07 +00:00
Kwoth
f61ff27ca3
Update responses.it-IT.json (POEditor.com)
2022-02-18 16:49:06 +00:00
Kwoth
06c90fee0b
Update responses.id-ID.json (POEditor.com)
2022-02-18 16:49:04 +00:00
Kwoth
6fbfe30cc5
Update responses.de-DE.json (POEditor.com)
2022-02-18 16:49:02 +00:00
Kwoth
45a898b66d
Update responses.fr-FR.json (POEditor.com)
2022-02-18 16:48:56 +00:00
Kwoth
27cbb6be78
Update responses.nl-NL.json (POEditor.com)
2022-02-18 16:48:56 +00:00
Kwoth
2105c86111
Update responses.zh-TW.json (POEditor.com)
2022-02-18 16:48:55 +00:00
Kwoth
1929c6b338
Update responses.zh-CN.json (POEditor.com)
2022-02-18 16:48:54 +00:00
Kwoth
80e3507841
Merge branch 'hokutochen-v4-patch-54610' into 'v4'
...
added "no owner message" advisory
See merge request Kwoth/nadekobot!223
2022-01-18 22:48:20 +00:00
Kwoth
df5a7ecc47
Merge branch 'hokutochen-v4-patch-90947' into 'v4'
...
Readded table of contents.
See merge request Kwoth/nadekobot!224
2022-01-18 22:48:09 +00:00
Kwoth
0620133c5e
Merge branch 'hokutochen-v4-patch-40566' into 'v4'
...
added args: "{0}" to windows updater restart example
See merge request Kwoth/nadekobot!227
2022-01-18 22:47:47 +00:00
Kwoth
4c2f7dde5f
Merge branch 'hokutochen-v4-patch-96655' into 'v4'
...
same as !229
See merge request Kwoth/nadekobot!230
2022-01-18 22:47:36 +00:00
Kwoth
a70b58332f
Merge branch 'hokutochen-v4-patch-04139' into 'v4'
...
added bold lettering to intents
See merge request Kwoth/nadekobot!222
2022-01-18 22:47:17 +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