Fixes, quests are slightly more difficult
This commit is contained in:
parent
aba5c4fbfd
commit
6891869046
15 changed files with 31 additions and 30 deletions
src
Ellie.Marmalade
EllieBot
EllieBot.csproj
Modules
Gambling
Games/Quests/QuestModels
BetQuest.csCatchFishQuest.csCatchTrashQuest.csGiftWaifuQuest.csGiveFlowersQuest.csHangmanWinQuest.csIQuest.cs
Owner
Utility/Quote
_common/Impl
strings/responses
|
@ -9,7 +9,7 @@
|
|||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Discord.Net.Core" Version="3.17.1" />
|
||||
<PackageReference Include="Discord.Net.Core" Version="3.17.2" />
|
||||
<PackageReference Include="Serilog" Version="4.2.0" />
|
||||
<PackageReference Include="YamlDotNet" Version="15.1.6" />
|
||||
</ItemGroup>
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
</PackageReference>
|
||||
<PackageReference Include="CodeHollow.FeedReader" Version="1.2.6" />
|
||||
<PackageReference Include="CommandLineParser" Version="2.9.1" />
|
||||
<PackageReference Include="Discord.Net" Version="3.17.1" />
|
||||
<PackageReference Include="Discord.Net" Version="3.17.2" />
|
||||
<PackageReference Include="CoreCLR-NCalc" Version="3.1.253" />
|
||||
<PackageReference Include="Google.Apis.Urlshortener.v1" Version="1.41.1.138" />
|
||||
<PackageReference Include="Google.Apis.YouTube.v3" Version="1.68.0.3653" />
|
||||
|
|
|
@ -248,27 +248,27 @@ public class GamblingService : IEService, IReadyExecutor
|
|||
if (boostGuilds.Count > 0)
|
||||
{
|
||||
if (booster)
|
||||
msg += $"\\✅ *+{N(gcsData.BoostBonus.BaseTimelyBonus)} bonus for boosting {userInfo.guild}!*\n";
|
||||
msg += $"✅ *+{N(gcsData.BoostBonus.BaseTimelyBonus)} bonus for boosting {userInfo.guild}!*\n";
|
||||
else
|
||||
msg += $"\\❌ *+0 bonus for boosting {userInfo.guild}*\n";
|
||||
msg += $"❌ *+0 bonus for boosting {userInfo.guild}*\n";
|
||||
}
|
||||
|
||||
if (_ps.GetConfig().IsEnabled)
|
||||
{
|
||||
if (percentBonus > float.Epsilon)
|
||||
msg +=
|
||||
$"\\✅ *+{percentBonus:P0} bonus for the [Patreon](https://patreon.com/elliebot) pledge! <:hart:746995901758832712>*\n";
|
||||
$"✅ *+{percentBonus:P0} bonus for the [Patreon](https://patreon.com/elliebot) pledge! <:hart:746995901758832712>*\n";
|
||||
else
|
||||
msg += $"\\❌ *+0 bonus for the [Patreon](https://patreon.com/elliebot) pledge*\n";
|
||||
msg += $"❌ *+0 bonus for the [Patreon](https://patreon.com/elliebot) pledge*\n";
|
||||
}
|
||||
|
||||
if (hasCompletedDailies)
|
||||
{
|
||||
msg += $"\\✅ *+50% bonus for completing daily quests*\n";
|
||||
msg += $"✅ *+50% bonus for completing daily quests*\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
msg += $"\\❌ *+0 bonus for completing daily quests*\n";
|
||||
msg += $"❌ *+0 bonus for completing daily quests*\n";
|
||||
}
|
||||
|
||||
return (originalAmount, msg);
|
||||
|
|
|
@ -14,7 +14,6 @@ public sealed class ServerCountRewardService(
|
|||
)
|
||||
: IEService, IReadyExecutor
|
||||
{
|
||||
|
||||
private Task dblTask = Task.CompletedTask;
|
||||
private Task discordsTask = Task.CompletedTask;
|
||||
|
||||
|
@ -37,7 +36,7 @@ public sealed class ServerCountRewardService(
|
|||
httpClient.DefaultRequestHeaders.TryAddWithoutValidation("Authorization", dblApiKey);
|
||||
httpClient.DefaultRequestHeaders.TryAddWithoutValidation("Content-Type", "application/json");
|
||||
await httpClient.PostAsJsonAsync(
|
||||
$"https://discordbotlist.com/api/v1/bots/{116275390695079945}/stats",
|
||||
$"https://discordbotlist.com/api/v1/bots/{608119997713350679}/stats",
|
||||
new
|
||||
{
|
||||
users = client.Guilds.Sum(x => x.MemberCount),
|
||||
|
@ -159,7 +158,7 @@ public class VoteRewardService(
|
|||
|
||||
await sender
|
||||
.Response(user)
|
||||
.Confirm(strs.vote_reward(N(reward)) + "\n\n" + msg)
|
||||
.Confirm($"You've received{N(reward)} for voting!\n\n{msg}")
|
||||
.SendAsync();
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
@ -176,7 +175,7 @@ public class VoteRewardService(
|
|||
{
|
||||
var user = await client.GetUserAsync(userId);
|
||||
await _voteFeedChannel.SendMessageAsync(
|
||||
$"{user} just received {strs.vote_reward(N(reward))} for voting!",
|
||||
$"**{user}** just received **{N(reward)}** for voting!",
|
||||
allowedMentions: AllowedMentions.None);
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
|
|
@ -9,7 +9,7 @@ public sealed class BetQuest : IQuest
|
|||
=> "High Roller";
|
||||
|
||||
public string Desc
|
||||
=> "Place 10 bets";
|
||||
=> "Place 20 bets";
|
||||
|
||||
public string ProgDesc
|
||||
=> "bets placed";
|
||||
|
@ -18,7 +18,7 @@ public sealed class BetQuest : IQuest
|
|||
=> QuestEventType.BetPlaced;
|
||||
|
||||
public long RequiredAmount
|
||||
=> 10;
|
||||
=> 20;
|
||||
|
||||
public long TryUpdateProgress(IDictionary<string, string> metadata, long oldProgress)
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@ public sealed class CatchFishQuest : IQuest
|
|||
=> "Fisherman";
|
||||
|
||||
public string Desc
|
||||
=> "Catch 5 fish";
|
||||
=> "Catch 10 fish";
|
||||
|
||||
public string ProgDesc
|
||||
=> "fish caught";
|
||||
|
@ -18,7 +18,7 @@ public sealed class CatchFishQuest : IQuest
|
|||
=> QuestEventType.FishCaught;
|
||||
|
||||
public long RequiredAmount
|
||||
=> 5;
|
||||
=> 10;
|
||||
|
||||
public long TryUpdateProgress(IDictionary<string, string> metadata, long oldProgress)
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@ public sealed class CatchTrashQuest : IQuest
|
|||
=> "Environmentalist";
|
||||
|
||||
public string Desc
|
||||
=> "Catch 5 trash items while fishing";
|
||||
=> "Catch 10 trash items while fishing";
|
||||
|
||||
public string ProgDesc
|
||||
=> "items caught";
|
||||
|
@ -18,7 +18,7 @@ public sealed class CatchTrashQuest : IQuest
|
|||
=> QuestEventType.FishCaught;
|
||||
|
||||
public long RequiredAmount
|
||||
=> 5;
|
||||
=> 10;
|
||||
|
||||
public long TryUpdateProgress(IDictionary<string, string> metadata, long oldProgress)
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@ public sealed class GiftWaifuQuest : IQuest
|
|||
=> "Generous Gifter";
|
||||
|
||||
public string Desc
|
||||
=> "Gift a waifu";
|
||||
=> "Gift a waifu 2 times";
|
||||
|
||||
public string ProgDesc
|
||||
=> "waifus gifted";
|
||||
|
@ -18,7 +18,7 @@ public sealed class GiftWaifuQuest : IQuest
|
|||
=> QuestEventType.WaifuGiftSent;
|
||||
|
||||
public long RequiredAmount
|
||||
=> 1;
|
||||
=> 2;
|
||||
|
||||
public long TryUpdateProgress(IDictionary<string, string> metadata, long oldProgress)
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@ public sealed class GiveFlowersQuest : IQuest
|
|||
=> "Sharing is Caring";
|
||||
|
||||
public string Desc
|
||||
=> "Give 10 flowers to someone";
|
||||
=> "Give 20 flowers to someone";
|
||||
|
||||
public string ProgDesc
|
||||
=> "flowers given";
|
||||
|
@ -18,7 +18,7 @@ public sealed class GiveFlowersQuest : IQuest
|
|||
=> QuestEventType.Give;
|
||||
|
||||
public long RequiredAmount
|
||||
=> 10;
|
||||
=> 20;
|
||||
|
||||
public long TryUpdateProgress(IDictionary<string, string> metadata, long oldProgress)
|
||||
{
|
||||
|
|
|
@ -9,7 +9,7 @@ public sealed class HangmanWinQuest : IQuest
|
|||
=> "Hangman Champion";
|
||||
|
||||
public string Desc
|
||||
=> "Win a game of Hangman";
|
||||
=> "Win 2 games of Hangman";
|
||||
|
||||
public string ProgDesc
|
||||
=> "hangman games won";
|
||||
|
@ -18,7 +18,7 @@ public sealed class HangmanWinQuest : IQuest
|
|||
=> QuestEventType.GameWon;
|
||||
|
||||
public long RequiredAmount
|
||||
=> 1;
|
||||
=> 2;
|
||||
|
||||
public long TryUpdateProgress(IDictionary<string, string> metadata, long oldProgress)
|
||||
{
|
||||
|
|
|
@ -24,10 +24,10 @@ public interface IQuest
|
|||
/// <summary>
|
||||
/// Completed Emoji
|
||||
/// </summary>
|
||||
public const string COMPLETED = "\\✅";
|
||||
public const string COMPLETED = "✅";
|
||||
|
||||
/// <summary>
|
||||
/// Incomplete Emoji
|
||||
/// </summary>
|
||||
public const string INCOMPLETE = "\\❌";
|
||||
public const string INCOMPLETE = "❌";
|
||||
}
|
|
@ -36,7 +36,8 @@ public class Owner(VoteRewardService vrs) : EllieModule
|
|||
var batch = users[currentIndex..(currentIndex += 50)];
|
||||
|
||||
var mentions = batch.Select(x => x.Mention).Join(" ");
|
||||
await ctx.Channel.SendMessageAsync(mentions, allowedMentions: AllowedMentions.All);
|
||||
var msg = await ctx.Channel.SendMessageAsync(mentions, allowedMentions: AllowedMentions.All);
|
||||
msg.DeleteAfter(3);
|
||||
}
|
||||
catch
|
||||
{
|
||||
|
|
|
@ -236,6 +236,7 @@ public partial class Utility
|
|||
}
|
||||
|
||||
|
||||
[Cmd]
|
||||
[RequireContext(ContextType.Guild)]
|
||||
public async Task QuoteAdd(string keyword, [Leftover] string text)
|
||||
{
|
||||
|
|
|
@ -133,9 +133,9 @@ public sealed class BotCredsProvider : IBotCredsProvider
|
|||
if (File.Exists(CREDS_FILE_NAME))
|
||||
{
|
||||
var creds = Yaml.Deserializer.Deserialize<Creds>(File.ReadAllText(CREDS_FILE_NAME));
|
||||
if (creds.Version < 21)
|
||||
if (creds.Version < 22)
|
||||
{
|
||||
creds.Version = 21;
|
||||
creds.Version = 22;
|
||||
File.WriteAllText(CREDS_FILE_NAME, Yaml.Serializer.Serialize(creds));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1242,7 +1242,7 @@
|
|||
"linkfix_not_found": "No link fix found for {0}.",
|
||||
"notify_cant_set": "This event doesn't support origin channel, Please specify a channel",
|
||||
"vote_reward": "Thank you for voting! You've received {0}.",
|
||||
"vote_suggest": "Voting for the bot once every 6 hours will get you {0}!",
|
||||
"vote_suggest": "Voting for the bot will get you {0}!",
|
||||
"vote_disabled": "Voting is disabled.",
|
||||
"quest_log": "Quest Log",
|
||||
"dailies_done": "You've completed your dailies!",
|
||||
|
|
Loading…
Add table
Reference in a new issue