mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
Added missing patron tiers. Servers whose owner is bot owner will get excluded from patron quota. Use discord slowmode or cmdcd + nadeko permissions to limit usage
This commit is contained in:
@@ -136,7 +136,7 @@ public class ChatterBotService : IExecOnMessage
|
||||
|
||||
var channel = (ITextChannel)usrMsg.Channel;
|
||||
var conf = _ps.GetConfig();
|
||||
if (conf.IsEnabled)
|
||||
if (!_creds.IsOwner(sg.OwnerId) && conf.IsEnabled)
|
||||
{
|
||||
var quota = await _ps.TryGetFeatureLimitAsync(_flKey, sg.OwnerId, 0);
|
||||
|
||||
|
@@ -641,7 +641,6 @@ public sealed class PatronageService
|
||||
};
|
||||
}
|
||||
|
||||
// should i allow users to pay extra for more quota?
|
||||
private IReadOnlyDictionary<string, FeatureQuotaStats> GetFeatureQuotaStats(
|
||||
PatronTier patronTier,
|
||||
IReadOnlyDictionary<string, PatronQuota>? allQuotasDict,
|
||||
@@ -747,6 +746,9 @@ public sealed class PatronageService
|
||||
|
||||
return user.AmountCents switch
|
||||
{
|
||||
>= 10_000 => PatronTier.C,
|
||||
>= 5000 => PatronTier.L,
|
||||
>= 2000 => PatronTier.XX,
|
||||
>= 1000 => PatronTier.X,
|
||||
>= 500 => PatronTier.V,
|
||||
>= 100 => PatronTier.I,
|
||||
|
@@ -1,66 +1,66 @@
|
||||
# DO NOT CHANGE
|
||||
version: 1
|
||||
# Whether the patronage feature is enabled
|
||||
isEnabled: false
|
||||
isEnabled: true
|
||||
# List of patron only features and relevant quota data
|
||||
quotas:
|
||||
# Dictionary of feature names with their respective limits. Set to null for unlimited
|
||||
features:
|
||||
"timely:extra_percent":
|
||||
v: 10
|
||||
x: 22
|
||||
xx: 50
|
||||
l: 150
|
||||
c: 350
|
||||
"rero:max_count":
|
||||
v: 25
|
||||
x: 50
|
||||
"cleverbot:response":
|
||||
v: -20
|
||||
x: 5000
|
||||
xx: 12000
|
||||
l: 35000
|
||||
c: 100000
|
||||
timely:extra_percent:
|
||||
V: 10
|
||||
X: 22
|
||||
XX: 50
|
||||
L: 150
|
||||
C: 350
|
||||
rero:max_count:
|
||||
V: 25
|
||||
X: 50
|
||||
cleverbot:response:
|
||||
V: -20
|
||||
X: 5000
|
||||
XX: 12000
|
||||
L: 35000
|
||||
C: 100000
|
||||
# Dictionary of commands with their respective quota data
|
||||
commands:
|
||||
prune:
|
||||
x:
|
||||
perHour: 1
|
||||
xx:
|
||||
perHour: 3
|
||||
X:
|
||||
PerHour: 1
|
||||
XX:
|
||||
PerHour: 3
|
||||
google:
|
||||
v:
|
||||
perDay: 15
|
||||
x:
|
||||
perDay: 30
|
||||
xx:
|
||||
perDay: 60
|
||||
l:
|
||||
perDay: 150
|
||||
c:
|
||||
perDay: 300
|
||||
V:
|
||||
PerDay: 15
|
||||
X:
|
||||
PerDay: 30
|
||||
XX:
|
||||
PerDay: 60
|
||||
L:
|
||||
PerDay: 150
|
||||
C:
|
||||
PerDay: 300
|
||||
image:
|
||||
v:
|
||||
perDay: 15
|
||||
x:
|
||||
perDay: 30
|
||||
xx:
|
||||
perDay: 60
|
||||
l:
|
||||
perDay: 150
|
||||
c:
|
||||
perDay: 300
|
||||
V:
|
||||
PerDay: 15
|
||||
X:
|
||||
PerDay: 30
|
||||
XX:
|
||||
PerDay: 60
|
||||
L:
|
||||
PerDay: 150
|
||||
C:
|
||||
PerDay: 300
|
||||
youtube:
|
||||
v:
|
||||
perDay: 25
|
||||
x:
|
||||
perDay: 50
|
||||
xx:
|
||||
perDay: 100
|
||||
l:
|
||||
perDay: 250
|
||||
c:
|
||||
perDay: 500
|
||||
V:
|
||||
PerDay: 25
|
||||
X:
|
||||
PerDay: 50
|
||||
XX:
|
||||
PerDay: 100
|
||||
L:
|
||||
PerDay: 250
|
||||
C:
|
||||
PerDay: 500
|
||||
# Dictionary of groups with their respective quota data
|
||||
groups: {}
|
||||
# Dictionary of modules with their respective quota data
|
||||
|
Reference in New Issue
Block a user