コード例 #1
0
        public async Task RedeemLegacyTokenAsync([Remainder] string token = null)
        {
            if (token == null)
            {
                await SimpleEmbedAsync("This is used to redeem tokens that were created using the old ELO version.", Color.Blue);

                return;
            }

            if (Migrator.RedeemToken(Context.Guild.Id, token))
            {
                await SimpleEmbedAsync("Token redeemed.", Color.Green);
            }
            else
            {
                await SimpleEmbedAsync($"Invalid token provided, if you believe this is a mistake please contact support at: {PatreonIntegration.GetConfig().ServerInvite}", Color.Red);
            }
        }