mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
Removed some obsolete commands and strings
This commit is contained in:
@@ -1,45 +0,0 @@
|
||||
using NadekoBot.Modules.Utility.Services;
|
||||
|
||||
namespace NadekoBot.Modules.Utility;
|
||||
|
||||
public partial class Utility
|
||||
{
|
||||
[Group]
|
||||
public class PatreonCommands : NadekoSubmodule<PatreonRewardsService>
|
||||
{
|
||||
private readonly IBotCredentials _creds;
|
||||
|
||||
public PatreonCommands(IBotCredentials creds)
|
||||
{
|
||||
_creds = creds;
|
||||
}
|
||||
|
||||
[NadekoCommand, Aliases]
|
||||
[RequireContext(ContextType.DM)]
|
||||
public async Task ClaimPatreonRewards()
|
||||
{
|
||||
if (string.IsNullOrWhiteSpace(_creds.Patreon.AccessToken))
|
||||
{
|
||||
Log.Warning("In order to use patreon reward commands, " +
|
||||
"you need to specify CampaignId and AccessToken in creds.yml");
|
||||
return;
|
||||
}
|
||||
|
||||
if (DateTime.UtcNow.Day < 5)
|
||||
{
|
||||
await ReplyErrorLocalizedAsync(strs.clpa_too_early).ConfigureAwait(false);
|
||||
return;
|
||||
}
|
||||
|
||||
var rem = _service.Interval - (DateTime.UtcNow - _service.LastUpdate);
|
||||
var helpcmd = Format.Code(Prefix + "donate");
|
||||
await ctx.Channel.EmbedAsync(_eb.Create().WithOkColor()
|
||||
.WithDescription(GetText(strs.clpa_obsolete))
|
||||
.AddField(GetText(strs.clpa_fail_already_title), GetText(strs.clpa_fail_already))
|
||||
.AddField(GetText(strs.clpa_fail_wait_title), GetText(strs.clpa_fail_wait))
|
||||
.AddField(GetText(strs.clpa_fail_conn_title), GetText(strs.clpa_fail_conn))
|
||||
.AddField(GetText(strs.clpa_fail_sup_title), GetText(strs.clpa_fail_sup(helpcmd)))
|
||||
.WithFooter(GetText(strs.clpa_next_update(rem))));
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user