mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
docs: Upped version to 5.1.19, updated changelog
fix: Fixed timely on different shards
This commit is contained in:
@@ -241,12 +241,12 @@ public partial class Gambling : GamblingModule<GamblingService>
|
||||
await msg.DeleteAsync();
|
||||
return;
|
||||
}
|
||||
else if(Config.Timely.ProtType == TimelyProt.Captcha)
|
||||
else if (Config.Timely.ProtType == TimelyProt.Captcha)
|
||||
{
|
||||
var password = _service.GeneratePassword();
|
||||
|
||||
|
||||
var img = new Image<Rgba32>(70, 35);
|
||||
|
||||
|
||||
var font = _fonts.NotoSans.CreateFont(30);
|
||||
var outlinePen = new SolidPen(Color.Black, 1f);
|
||||
var strikeoutRun = new RichTextRun
|
||||
@@ -291,7 +291,6 @@ public partial class Gambling : GamblingModule<GamblingService>
|
||||
{
|
||||
_ = captcha.DeleteAsync();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
await ClaimTimely();
|
||||
@@ -325,22 +324,19 @@ public partial class Gambling : GamblingModule<GamblingService>
|
||||
{
|
||||
try
|
||||
{
|
||||
var guild = await ((IDiscordClient)_client).GetGuildAsync(gid);
|
||||
if (guild is null)
|
||||
return null;
|
||||
|
||||
var user = await guild.GetUserAsync(ctx.User.Id);
|
||||
return user;
|
||||
var guild = await _client.Rest.GetGuildAsync(gid, false);
|
||||
var user = await _client.Rest.GetGuildUserAsync(gid, ctx.User.Id);
|
||||
return (guild, user);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
return default;
|
||||
}
|
||||
})
|
||||
.WhenAll();
|
||||
|
||||
var boostGuildUser = guildUsers.FirstOrDefault(x => x?.PremiumSince is not null);
|
||||
var booster = boostGuildUser is not null;
|
||||
var userInfo = guildUsers.FirstOrDefault(x => x.user?.PremiumSince is not null);
|
||||
var booster = userInfo != default;
|
||||
|
||||
if (booster)
|
||||
val += Config.BoostBonus.BaseTimelyBonus;
|
||||
@@ -359,7 +355,7 @@ public partial class Gambling : GamblingModule<GamblingService>
|
||||
{
|
||||
var msg = GetText(strs.timely(N(val), period))
|
||||
+ "\n\n"
|
||||
+ $"*+{N(Config.BoostBonus.BaseTimelyBonus)} bonus for boosting {boostGuildUser.Guild}!*";
|
||||
+ $"*+{N(Config.BoostBonus.BaseTimelyBonus)} bonus for boosting {userInfo.guild}!*";
|
||||
|
||||
await Response().Confirm(msg).Interaction(inter).SendAsync();
|
||||
}
|
||||
|
@@ -147,7 +147,7 @@ public class PlantPickService : INService, IExecNoCommand
|
||||
pass = pass.TrimTo(10, true).ToLowerInvariant();
|
||||
using var img = Image.Load<Rgba32>(curImg);
|
||||
// choose font size based on the image height, so that it's visible
|
||||
var font = _fonts.NotoSans.CreateFont(img.Height / 12.0f, FontStyle.Bold);
|
||||
var font = _fonts.NotoSans.CreateFont(img.Height / 11.0f, FontStyle.Bold);
|
||||
img.Mutate(x =>
|
||||
{
|
||||
// measure the size of the text to be drawing
|
||||
@@ -159,7 +159,7 @@ public class PlantPickService : INService, IExecNoCommand
|
||||
|
||||
// fill the background with black, add 5 pixels on each side to make it look better
|
||||
x.FillPolygon(Color.ParseHex("00000080"),
|
||||
new PointF(0, 0),
|
||||
new PointF(1, 1),
|
||||
new PointF(size.Width + 5, 0),
|
||||
new PointF(size.Width + 5, size.Height + 10),
|
||||
new PointF(0, size.Height + 10));
|
||||
|
Reference in New Issue
Block a user