mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-11-03 08:14:28 -05: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 channel = (ITextChannel)usrMsg.Channel;
|
||||||
var conf = _ps.GetConfig();
|
var conf = _ps.GetConfig();
|
||||||
if (conf.IsEnabled)
|
if (!_creds.IsOwner(sg.OwnerId) && conf.IsEnabled)
|
||||||
{
|
{
|
||||||
var quota = await _ps.TryGetFeatureLimitAsync(_flKey, sg.OwnerId, 0);
|
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(
|
private IReadOnlyDictionary<string, FeatureQuotaStats> GetFeatureQuotaStats(
|
||||||
PatronTier patronTier,
|
PatronTier patronTier,
|
||||||
IReadOnlyDictionary<string, PatronQuota>? allQuotasDict,
|
IReadOnlyDictionary<string, PatronQuota>? allQuotasDict,
|
||||||
@@ -747,6 +746,9 @@ public sealed class PatronageService
|
|||||||
|
|
||||||
return user.AmountCents switch
|
return user.AmountCents switch
|
||||||
{
|
{
|
||||||
|
>= 10_000 => PatronTier.C,
|
||||||
|
>= 5000 => PatronTier.L,
|
||||||
|
>= 2000 => PatronTier.XX,
|
||||||
>= 1000 => PatronTier.X,
|
>= 1000 => PatronTier.X,
|
||||||
>= 500 => PatronTier.V,
|
>= 500 => PatronTier.V,
|
||||||
>= 100 => PatronTier.I,
|
>= 100 => PatronTier.I,
|
||||||
|
|||||||
@@ -1,66 +1,66 @@
|
|||||||
# DO NOT CHANGE
|
# DO NOT CHANGE
|
||||||
version: 1
|
version: 1
|
||||||
# Whether the patronage feature is enabled
|
# Whether the patronage feature is enabled
|
||||||
isEnabled: false
|
isEnabled: true
|
||||||
# List of patron only features and relevant quota data
|
# List of patron only features and relevant quota data
|
||||||
quotas:
|
quotas:
|
||||||
# Dictionary of feature names with their respective limits. Set to null for unlimited
|
# Dictionary of feature names with their respective limits. Set to null for unlimited
|
||||||
features:
|
features:
|
||||||
"timely:extra_percent":
|
timely:extra_percent:
|
||||||
v: 10
|
V: 10
|
||||||
x: 22
|
X: 22
|
||||||
xx: 50
|
XX: 50
|
||||||
l: 150
|
L: 150
|
||||||
c: 350
|
C: 350
|
||||||
"rero:max_count":
|
rero:max_count:
|
||||||
v: 25
|
V: 25
|
||||||
x: 50
|
X: 50
|
||||||
"cleverbot:response":
|
cleverbot:response:
|
||||||
v: -20
|
V: -20
|
||||||
x: 5000
|
X: 5000
|
||||||
xx: 12000
|
XX: 12000
|
||||||
l: 35000
|
L: 35000
|
||||||
c: 100000
|
C: 100000
|
||||||
# Dictionary of commands with their respective quota data
|
# Dictionary of commands with their respective quota data
|
||||||
commands:
|
commands:
|
||||||
prune:
|
prune:
|
||||||
x:
|
X:
|
||||||
perHour: 1
|
PerHour: 1
|
||||||
xx:
|
XX:
|
||||||
perHour: 3
|
PerHour: 3
|
||||||
google:
|
google:
|
||||||
v:
|
V:
|
||||||
perDay: 15
|
PerDay: 15
|
||||||
x:
|
X:
|
||||||
perDay: 30
|
PerDay: 30
|
||||||
xx:
|
XX:
|
||||||
perDay: 60
|
PerDay: 60
|
||||||
l:
|
L:
|
||||||
perDay: 150
|
PerDay: 150
|
||||||
c:
|
C:
|
||||||
perDay: 300
|
PerDay: 300
|
||||||
image:
|
image:
|
||||||
v:
|
V:
|
||||||
perDay: 15
|
PerDay: 15
|
||||||
x:
|
X:
|
||||||
perDay: 30
|
PerDay: 30
|
||||||
xx:
|
XX:
|
||||||
perDay: 60
|
PerDay: 60
|
||||||
l:
|
L:
|
||||||
perDay: 150
|
PerDay: 150
|
||||||
c:
|
C:
|
||||||
perDay: 300
|
PerDay: 300
|
||||||
youtube:
|
youtube:
|
||||||
v:
|
V:
|
||||||
perDay: 25
|
PerDay: 25
|
||||||
x:
|
X:
|
||||||
perDay: 50
|
PerDay: 50
|
||||||
xx:
|
XX:
|
||||||
perDay: 100
|
PerDay: 100
|
||||||
l:
|
L:
|
||||||
perDay: 250
|
PerDay: 250
|
||||||
c:
|
C:
|
||||||
perDay: 500
|
PerDay: 500
|
||||||
# Dictionary of groups with their respective quota data
|
# Dictionary of groups with their respective quota data
|
||||||
groups: {}
|
groups: {}
|
||||||
# Dictionary of modules with their respective quota data
|
# Dictionary of modules with their respective quota data
|
||||||
|
|||||||
Reference in New Issue
Block a user