Merge remote-tracking branch 'Kwoth/dev' into dev

This commit is contained in:
Shikhir Arora 2017-02-20 12:22:32 -05:00
commit 0a9241a5d2
15 changed files with 1368 additions and 183 deletions

@ -1 +1 @@
Subproject commit 9ce5c4757efc6cb6bb8959e851abcdcbe03217be
Subproject commit d2229228b92117899d65cd549a1f2853057b255b

View File

@ -440,6 +440,7 @@ namespace NadekoBot.Modules.Administration
var enumerable = (await Context.Channel.GetMessagesAsync().Flatten()).AsEnumerable();
enumerable = enumerable.Where(x => x.Author.Id == user.Id);
await Context.Channel.DeleteMessagesAsync(enumerable).ConfigureAwait(false);
Context.Message.DeleteAfter(3);
}
// prune x
@ -474,6 +475,8 @@ namespace NadekoBot.Modules.Administration
int limit = (count < 100) ? count : 100;
var enumerable = (await Context.Channel.GetMessagesAsync(limit: limit).Flatten()).Where(m => m.Author == user);
await Context.Channel.DeleteMessagesAsync(enumerable).ConfigureAwait(false);
Context.Message.DeleteAfter(3);
}
[NadekoCommand, Usage, Description, Aliases]

View File

@ -28,7 +28,7 @@ namespace NadekoBot.Modules.Gambling
var ar = new AnimalRace(Context.Guild.Id, (ITextChannel)Context.Channel, Prefix);
if (ar.Fail)
await Context.Channel.SendErrorAsync("🏁 `Failed starting a race. Another race is probably running.`").ConfigureAwait(false);
await ReplyErrorLocalized("race_failed_starting").ConfigureAwait(false);
}
[NadekoCommand, Usage, Description, Aliases]
@ -43,7 +43,7 @@ namespace NadekoBot.Modules.Gambling
AnimalRace ar;
if (!AnimalRaces.TryGetValue(Context.Guild.Id, out ar))
{
await Context.Channel.SendErrorAsync("No race exists on this server").ConfigureAwait(false);
await ReplyErrorLocalized("race_not_exist").ConfigureAwait(false);
return;
}
await ar.JoinRace(Context.User as IGuildUser, amount);
@ -56,22 +56,22 @@ namespace NadekoBot.Modules.Gambling
public bool Fail { get; set; }
public List<Participant> participants = new List<Participant>();
private ulong serverId;
private int messagesSinceGameStarted = 0;
private readonly List<Participant> _participants = new List<Participant>();
private readonly ulong _serverId;
private int _messagesSinceGameStarted;
private readonly string _prefix;
private Logger _log { get; }
private readonly Logger _log;
public ITextChannel raceChannel { get; set; }
public bool Started { get; private set; } = false;
private readonly ITextChannel _raceChannel;
public bool Started { get; private set; }
public AnimalRace(ulong serverId, ITextChannel ch, string prefix)
{
this._prefix = prefix;
this._log = LogManager.GetCurrentClassLogger();
this.serverId = serverId;
this.raceChannel = ch;
_prefix = prefix;
_log = LogManager.GetCurrentClassLogger();
_serverId = serverId;
_raceChannel = ch;
if (!AnimalRaces.TryAdd(serverId, this))
{
Fail = true;
@ -90,8 +90,8 @@ namespace NadekoBot.Modules.Gambling
{
try
{
await raceChannel.SendConfirmAsync("Animal Race", $"Starting in 20 seconds or when the room is full.",
footer: $"Type {_prefix}jr to join the race.");
await _raceChannel.SendConfirmAsync(GetText("animal_race"), GetText("animal_race_starting"),
footer: GetText("animal_race_join_instr", _prefix));
}
catch (Exception ex)
{
@ -102,16 +102,16 @@ namespace NadekoBot.Modules.Gambling
cancelSource.Cancel();
if (t == fullgame)
{
try { await raceChannel.SendConfirmAsync("Animal Race", "Full! Starting immediately."); } catch (Exception ex) { _log.Warn(ex); }
try { await _raceChannel.SendConfirmAsync(GetText("animal_race"), GetText("animal_race_full") ); } catch (Exception ex) { _log.Warn(ex); }
}
else if (participants.Count > 1)
else if (_participants.Count > 1)
{
try { await raceChannel.SendConfirmAsync("Animal Race", "Starting with " + participants.Count + " participants."); } catch (Exception ex) { _log.Warn(ex); }
try { await _raceChannel.SendConfirmAsync(GetText("animal_race"), GetText("animal_race_starting_with_x", _participants.Count)); } catch (Exception ex) { _log.Warn(ex); }
}
else
{
try { await raceChannel.SendErrorAsync("Animal Race", "Failed to start since there was not enough participants."); } catch (Exception ex) { _log.Warn(ex); }
var p = participants.FirstOrDefault();
try { await _raceChannel.SendErrorAsync(GetText("animal_race"), GetText("animal_race_failed")); } catch (Exception ex) { _log.Warn(ex); }
var p = _participants.FirstOrDefault();
if (p != null && p.AmountBet > 0)
await CurrencyHandler.AddCurrencyAsync(p.User, "BetRace", p.AmountBet, false).ConfigureAwait(false);
@ -128,7 +128,7 @@ namespace NadekoBot.Modules.Gambling
private void End()
{
AnimalRace throwaway;
AnimalRaces.TryRemove(serverId, out throwaway);
AnimalRaces.TryRemove(_serverId, out throwaway);
}
private async Task StartRace()
@ -136,21 +136,21 @@ namespace NadekoBot.Modules.Gambling
var rng = new NadekoRandom();
Participant winner = null;
IUserMessage msg = null;
int place = 1;
var place = 1;
try
{
NadekoBot.Client.MessageReceived += Client_MessageReceived;
while (!participants.All(p => p.Total >= 60))
while (!_participants.All(p => p.Total >= 60))
{
//update the state
participants.ForEach(p =>
_participants.ForEach(p =>
{
p.Total += 1 + rng.Next(0, 10);
});
participants
_participants
.OrderByDescending(p => p.Total)
.ForEach(p =>
{
@ -170,14 +170,14 @@ namespace NadekoBot.Modules.Gambling
//draw the state
var text = $@"|🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🔚|
{String.Join("\n", participants.Select(p => $"{(int)(p.Total / 60f * 100),-2}%|{p.ToString()}"))}
{String.Join("\n", _participants.Select(p => $"{(int)(p.Total / 60f * 100),-2}%|{p.ToString()}"))}
|🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🏁🔚|";
if (msg == null || messagesSinceGameStarted >= 10) // also resend the message if channel was spammed
if (msg == null || _messagesSinceGameStarted >= 10) // also resend the message if channel was spammed
{
if (msg != null)
try { await msg.DeleteAsync(); } catch { }
messagesSinceGameStarted = 0;
try { msg = await raceChannel.SendMessageAsync(text).ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); }
_messagesSinceGameStarted = 0;
try { msg = await _raceChannel.SendMessageAsync(text).ConfigureAwait(false); } catch (Exception ex) { _log.Warn(ex); }
}
else
{
@ -187,22 +187,33 @@ namespace NadekoBot.Modules.Gambling
await Task.Delay(2500);
}
}
catch { }
catch
{
// ignored
}
finally
{
NadekoBot.Client.MessageReceived -= Client_MessageReceived;
}
if (winner.AmountBet > 0)
if (winner != null)
{
var wonAmount = winner.AmountBet * (participants.Count - 1);
if (winner.AmountBet > 0)
{
var wonAmount = winner.AmountBet * (_participants.Count - 1);
await CurrencyHandler.AddCurrencyAsync(winner.User, "Won a Race", wonAmount, true).ConfigureAwait(false);
await raceChannel.SendConfirmAsync("Animal Race", $"{winner.User.Mention} as {winner.Animal} **Won the race and {wonAmount}{CurrencySign}!**").ConfigureAwait(false);
}
else
{
await raceChannel.SendConfirmAsync("Animal Race", $"{winner.User.Mention} as {winner.Animal} **Won the race!**").ConfigureAwait(false);
await CurrencyHandler.AddCurrencyAsync(winner.User, "Won a Race", wonAmount, true)
.ConfigureAwait(false);
await _raceChannel.SendConfirmAsync(GetText("animal_race"),
Format.Bold(GetText("animal_race_won_money", winner.User.Mention,
winner.Animal, wonAmount + CurrencySign)))
.ConfigureAwait(false);
}
else
{
await _raceChannel.SendConfirmAsync(GetText("animal_race"),
Format.Bold(GetText("animal_race_won", winner.User.Mention, winner.Animal))).ConfigureAwait(false);
}
}
}
@ -212,9 +223,9 @@ namespace NadekoBot.Modules.Gambling
var msg = imsg as SocketUserMessage;
if (msg == null)
return Task.CompletedTask;
if (msg.IsAuthor() || !(imsg.Channel is ITextChannel) || imsg.Channel != raceChannel)
if (msg.IsAuthor() || !(imsg.Channel is ITextChannel) || imsg.Channel != _raceChannel)
return Task.CompletedTask;
messagesSinceGameStarted++;
_messagesSinceGameStarted++;
return Task.CompletedTask;
}
@ -228,51 +239,66 @@ namespace NadekoBot.Modules.Gambling
public async Task JoinRace(IGuildUser u, int amount = 0)
{
var animal = "";
string animal;
if (!animals.TryDequeue(out animal))
{
await raceChannel.SendErrorAsync($"{u.Mention} `There is no running race on this server.`").ConfigureAwait(false);
await _raceChannel.SendErrorAsync(GetText("animal_race_no_race")).ConfigureAwait(false);
return;
}
var p = new Participant(u, animal, amount);
if (participants.Contains(p))
if (_participants.Contains(p))
{
await raceChannel.SendErrorAsync($"{u.Mention} `You already joined this race.`").ConfigureAwait(false);
await _raceChannel.SendErrorAsync(GetText("animal_race_already_in")).ConfigureAwait(false);
return;
}
if (Started)
{
await raceChannel.SendErrorAsync($"{u.Mention} `Race is already started`").ConfigureAwait(false);
await _raceChannel.SendErrorAsync(GetText("animal_race_already_started")).ConfigureAwait(false);
return;
}
if (amount > 0)
if (!await CurrencyHandler.RemoveCurrencyAsync((IGuildUser)u, "BetRace", amount, false).ConfigureAwait(false))
if (!await CurrencyHandler.RemoveCurrencyAsync(u, "BetRace", amount, false).ConfigureAwait(false))
{
try { await raceChannel.SendErrorAsync($"{u.Mention} You don't have enough {NadekoBot.BotConfig.CurrencyPluralName}.").ConfigureAwait(false); } catch { }
await _raceChannel.SendErrorAsync(GetText("not_enough", CurrencySign)).ConfigureAwait(false);
return;
}
participants.Add(p);
await raceChannel.SendConfirmAsync("Animal Race", $"{u.Mention} **joined as a {p.Animal}" + (amount > 0 ? $" and bet {amount} {CurrencySign}!**" : "**"))
.ConfigureAwait(false);
_participants.Add(p);
string confStr;
if (amount > 0)
confStr = GetText("animal_race_join_bet", u.Mention, p.Animal, amount + CurrencySign);
else
confStr = GetText("animal_race_join", u.Mention, p.Animal);
await _raceChannel.SendConfirmAsync(GetText("animal_race"), Format.Bold(confStr)).ConfigureAwait(false);
}
private string GetText(string text)
=> NadekoModule.GetTextStatic(text,
NadekoBot.Localization.GetCultureInfo(_raceChannel.Guild),
typeof(Gambling).Name.ToLowerInvariant());
private string GetText(string text, params object[] replacements)
=> NadekoModule.GetTextStatic(text,
NadekoBot.Localization.GetCultureInfo(_raceChannel.Guild),
typeof(Gambling).Name.ToLowerInvariant(),
replacements);
}
public class Participant
{
public IGuildUser User { get; set; }
public string Animal { get; set; }
public int AmountBet { get; set; }
public IGuildUser User { get; }
public string Animal { get; }
public int AmountBet { get; }
public float Coeff { get; set; }
public int Total { get; set; }
public int Place { get; set; } = 0;
public int Place { get; set; }
public Participant(IGuildUser u, string a, int amount)
{
this.User = u;
this.Animal = a;
this.AmountBet = amount;
User = u;
Animal = a;
AmountBet = amount;
}
public override int GetHashCode() => User.GetHashCode();
@ -288,23 +314,13 @@ namespace NadekoBot.Modules.Gambling
var str = new string('‣', Total) + Animal;
if (Place == 0)
return str;
if (Place == 1)
{
return str + "🏆";
}
else if (Place == 2)
{
return str + "`2nd`";
}
else if (Place == 3)
{
return str + "`3rd`";
}
else
{
return str + $"`{Place}th`";
}
str += $"`#{Place}`";
if (Place == 1)
str += "🏆";
return str;
}
}
}

View File

@ -22,7 +22,7 @@ namespace NadekoBot.Modules.Gambling
private Regex dndRegex { get; } = new Regex(@"^(?<n1>\d+)d(?<n2>\d+)(?:\+(?<add>\d+))?(?:\-(?<sub>\d+))?$", RegexOptions.Compiled);
private Regex fudgeRegex { get; } = new Regex(@"^(?<n1>\d+)d(?:F|f)$", RegexOptions.Compiled);
private readonly char[] fateRolls = new[] { '-', ' ', '+' };
private readonly char[] _fateRolls = { '-', ' ', '+' };
[NadekoCommand, Usage, Description, Aliases]
public async Task Roll()
@ -40,7 +40,9 @@ namespace NadekoBot.Modules.Gambling
return ms;
}).ConfigureAwait(false);
await Context.Channel.SendFileAsync(imageStream, "dice.png", $"{Context.User.Mention} rolled " + Format.Code(gen.ToString())).ConfigureAwait(false);
await Context.Channel.SendFileAsync(imageStream,
"dice.png",
Context.User.Mention + " " + GetText("dice_rolled", Format.Code(gen.ToString()))).ConfigureAwait(false);
}
public enum RollOrderType
@ -82,7 +84,7 @@ namespace NadekoBot.Modules.Gambling
{
if (num < 1 || num > 30)
{
await Context.Channel.SendErrorAsync("Invalid number specified. You can roll up to 1-30 dice at a time.").ConfigureAwait(false);
await ReplyErrorLocalized("dice_invalid_number", 1, 30).ConfigureAwait(false);
return;
}
@ -120,7 +122,12 @@ namespace NadekoBot.Modules.Gambling
var ms = new MemoryStream();
bitmap.SaveAsPng(ms);
ms.Position = 0;
await Context.Channel.SendFileAsync(ms, "dice.png", $"{Context.User.Mention} rolled {values.Count} {(values.Count == 1 ? "die" : "dice")}. Total: **{values.Sum()}** Average: **{(values.Sum() / (1.0f * values.Count)).ToString("N2")}**").ConfigureAwait(false);
await Context.Channel.SendFileAsync(ms, "dice.png",
Context.User.Mention +
GetText("dice_rolled_num", Format.Bold(values.Count.ToString())) +
" " + GetText("Total: {1} Average: {2}",
Format.Bold(values.Sum().ToString()),
Format.Bold((values.Sum() / (1.0f * values.Count)).ToString("N2")))).ConfigureAwait(false);
}
private async Task InternallDndRoll(string arg, bool ordered)
@ -138,9 +145,9 @@ namespace NadekoBot.Modules.Gambling
for (int i = 0; i < n1; i++)
{
rolls.Add(fateRolls[rng.Next(0, fateRolls.Length)]);
rolls.Add(_fateRolls[rng.Next(0, _fateRolls.Length)]);
}
var embed = new EmbedBuilder().WithOkColor().WithDescription($"{Context.User.Mention} rolled {n1} fate {(n1 == 1 ? "die" : "dice")}.")
var embed = new EmbedBuilder().WithOkColor().WithDescription(Context.User.Mention + " " + GetText("dice_rolled_num", Format.Bold(n1.ToString())))
.AddField(efb => efb.WithName(Format.Bold("Result"))
.WithValue(string.Join(" ", rolls.Select(c => Format.Code($"[{c}]")))));
await Context.Channel.EmbedAsync(embed).ConfigureAwait(false);
@ -164,7 +171,7 @@ namespace NadekoBot.Modules.Gambling
}
var sum = arr.Sum();
var embed = new EmbedBuilder().WithOkColor().WithDescription($"{Context.User.Mention} rolled {n1} {(n1 == 1 ? "die" : "dice")} `1 to {n2}`")
var embed = new EmbedBuilder().WithOkColor().WithDescription(Context.User.Mention + " " +GetText("dice_rolled_num", n1) + $"`1 - {n2}`")
.AddField(efb => efb.WithName(Format.Bold("Rolls"))
.WithValue(string.Join(" ", (ordered ? arr.OrderBy(x => x).AsEnumerable() : arr).Select(x => Format.Code(x.ToString())))))
.AddField(efb => efb.WithName(Format.Bold("Sum"))
@ -177,30 +184,26 @@ namespace NadekoBot.Modules.Gambling
[NadekoCommand, Usage, Description, Aliases]
public async Task NRoll([Remainder] string range)
{
try
int rolled;
if (range.Contains("-"))
{
int rolled;
if (range.Contains("-"))
var arr = range.Split('-')
.Take(2)
.Select(int.Parse)
.ToArray();
if (arr[0] > arr[1])
{
var arr = range.Split('-')
.Take(2)
.Select(int.Parse)
.ToArray();
if (arr[0] > arr[1])
throw new ArgumentException("Second argument must be larger than the first one.");
rolled = new NadekoRandom().Next(arr[0], arr[1] + 1);
}
else
{
rolled = new NadekoRandom().Next(0, int.Parse(range) + 1);
await ReplyErrorLocalized("second_larger_than_first").ConfigureAwait(false);
return;
}
rolled = new NadekoRandom().Next(arr[0], arr[1] + 1);
}
else
{
rolled = new NadekoRandom().Next(0, int.Parse(range) + 1);
}
await Context.Channel.SendConfirmAsync($"{Context.User.Mention} rolled **{rolled}**.").ConfigureAwait(false);
}
catch (Exception ex)
{
await Context.Channel.SendErrorAsync($":anger: {ex.Message}").ConfigureAwait(false);
}
await ReplyConfirmLocalized("dice_rolled", Format.Bold(rolled.ToString())).ConfigureAwait(false);
}
private Image GetDice(int num)

View File

@ -3,13 +3,11 @@ using Discord.Commands;
using NadekoBot.Attributes;
using NadekoBot.Extensions;
using NadekoBot.Services;
using NadekoBot.Services.Database;
using NadekoBot.Services.Database.Models;
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace NadekoBot.Modules.Gambling
@ -49,8 +47,8 @@ namespace NadekoBot.Modules.Gambling
[Group]
public class WaifuClaimCommands : NadekoSubmodule
{
private static ConcurrentDictionary<ulong, DateTime> _divorceCooldowns { get; } = new ConcurrentDictionary<ulong, DateTime>();
private static ConcurrentDictionary<ulong, DateTime> _affinityCooldowns { get; } = new ConcurrentDictionary<ulong, DateTime>();
private static ConcurrentDictionary<ulong, DateTime> divorceCooldowns { get; } = new ConcurrentDictionary<ulong, DateTime>();
private static ConcurrentDictionary<ulong, DateTime> affinityCooldowns { get; } = new ConcurrentDictionary<ulong, DateTime>();
enum WaifuClaimResult
{
@ -65,20 +63,19 @@ namespace NadekoBot.Modules.Gambling
{
if (amount < 50)
{
await Context.Channel.SendErrorAsync($"{Context.User.Mention} No waifu is that cheap. You must pay at least 50{NadekoBot.BotConfig.CurrencySign} to get a waifu, even if their actual value is lower.").ConfigureAwait(false);
await ReplyErrorLocalized("waifu_isnt_cheap", 50 + CurrencySign).ConfigureAwait(false);
return;
}
if (target.Id == Context.User.Id)
{
await Context.Channel.SendErrorAsync(Context.User.Mention + " You can't claim yourself.").ConfigureAwait(false);
await ReplyErrorLocalized("waifu_not_yourself").ConfigureAwait(false);
return;
}
WaifuClaimResult result = WaifuClaimResult.NotEnoughFunds;
int? oldPrice = null;
WaifuClaimResult result;
WaifuInfo w;
var isAffinity = false;
bool isAffinity;
using (var uow = DbHandler.UnitOfWork())
{
w = uow.Waifus.ByWaifuUserId(target.Id);
@ -120,7 +117,6 @@ namespace NadekoBot.Modules.Gambling
{
var oldClaimer = w.Claimer;
w.Claimer = uow.DiscordUsers.GetOrCreate(Context.User);
oldPrice = w.Price;
w.Price = amount + (amount / 4);
result = WaifuClaimResult.Success;
@ -143,7 +139,6 @@ namespace NadekoBot.Modules.Gambling
{
var oldClaimer = w.Claimer;
w.Claimer = uow.DiscordUsers.GetOrCreate(Context.User);
oldPrice = w.Price;
w.Price = amount;
result = WaifuClaimResult.Success;
@ -165,22 +160,20 @@ namespace NadekoBot.Modules.Gambling
if (result == WaifuClaimResult.InsufficientAmount)
{
await Context.Channel.SendErrorAsync($"{Context.User.Mention} You must pay {Math.Ceiling(w.Price * (isAffinity ? 0.88f : 1.1f))} or more to claim that waifu!").ConfigureAwait(false);
await ReplyErrorLocalized("waifu_not_enough", Math.Ceiling(w.Price * (isAffinity ? 0.88f : 1.1f))).ConfigureAwait(false);
return;
}
else if (result == WaifuClaimResult.NotEnoughFunds)
if (result == WaifuClaimResult.NotEnoughFunds)
{
await Context.Channel.SendConfirmAsync($"{Context.User.Mention} you don't have {amount}{NadekoBot.BotConfig.CurrencySign}!")
.ConfigureAwait(false);
}
else
{
var msg = $"{Context.User.Mention} claimed {target.Mention} as their waifu for {amount}{NadekoBot.BotConfig.CurrencySign}!";
if (w.Affinity?.UserId == Context.User.Id)
msg += $"\n🎉 Their love is fulfilled! 🎉\n**{target}'s** new value is {w.Price}{NadekoBot.BotConfig.CurrencySign}!";
await Context.Channel.SendConfirmAsync(msg)
.ConfigureAwait(false);
await ReplyErrorLocalized("not_enough", CurrencySign).ConfigureAwait(false);
return;
}
var msg = GetText("waifu_claimed",
Format.Bold(target.ToString()),
amount + CurrencySign);
if (w.Affinity?.UserId == Context.User.Id)
msg += "\n" + GetText("waifu_fulfilled", target, w.Price + CurrencySign);
await Context.Channel.SendConfirmAsync(Context.User.Mention + msg).ConfigureAwait(false);
}
public enum DivorceResult
@ -192,7 +185,7 @@ namespace NadekoBot.Modules.Gambling
}
private static readonly TimeSpan DivorceLimit = TimeSpan.FromHours(6);
private static readonly TimeSpan _divorceLimit = TimeSpan.FromHours(6);
[NadekoCommand, Usage, Description, Aliases]
[RequireContext(ContextType.Guild)]
public async Task Divorce([Remainder]IUser target)
@ -200,19 +193,19 @@ namespace NadekoBot.Modules.Gambling
if (target.Id == Context.User.Id)
return;
var result = DivorceResult.NotYourWife;
TimeSpan difference = TimeSpan.Zero;
DivorceResult result;
var difference = TimeSpan.Zero;
var amount = 0;
WaifuInfo w = null;
using (var uow = DbHandler.UnitOfWork())
{
w = uow.Waifus.ByWaifuUserId(target.Id);
var now = DateTime.UtcNow;
if (w == null || w.Claimer == null || w.Claimer.UserId != Context.User.Id)
if (w?.Claimer == null || w.Claimer.UserId != Context.User.Id)
result = DivorceResult.NotYourWife;
else if (_divorceCooldowns.AddOrUpdate(Context.User.Id,
else if (divorceCooldowns.AddOrUpdate(Context.User.Id,
now,
(key, old) => ((difference = now.Subtract(old)) > DivorceLimit) ? now : old) != now)
(key, old) => ((difference = now.Subtract(old)) > _divorceLimit) ? now : old) != now)
{
result = DivorceResult.Cooldown;
}
@ -249,37 +242,39 @@ namespace NadekoBot.Modules.Gambling
if (result == DivorceResult.SucessWithPenalty)
{
await Context.Channel.SendConfirmAsync($"{Context.User.Mention} You have divorced a waifu who likes you. You heartless monster.\n{w.Waifu} received {amount}{NadekoBot.BotConfig.CurrencySign} as a compensation.").ConfigureAwait(false);
await ReplyConfirmLocalized("waifu_divorced_like", Format.Bold(w.Waifu.ToString()), amount + CurrencySign).ConfigureAwait(false);
}
else if (result == DivorceResult.Success)
{
await Context.Channel.SendConfirmAsync($"{Context.User.Mention} You have divorced a waifu who doesn't like you. You received {amount}{NadekoBot.BotConfig.CurrencySign} back.").ConfigureAwait(false);
await ReplyConfirmLocalized("waifu_divorced_notlike", amount + CurrencySign).ConfigureAwait(false);
}
else if (result == DivorceResult.NotYourWife)
{
await Context.Channel.SendErrorAsync($"{Context.User.Mention} That waifu is not yours.").ConfigureAwait(false);
await ReplyErrorLocalized("waifu_not_yours").ConfigureAwait(false);
}
else
{
var remaining = DivorceLimit.Subtract(difference);
await Context.Channel.SendErrorAsync($"{Context.User.Mention} You divorced recently. You must wait **{remaining.Hours} hours and {remaining.Minutes} minutes** to divorce again.").ConfigureAwait(false);
var remaining = _divorceLimit.Subtract(difference);
await ReplyErrorLocalized("waifu_recent_divorce",
Format.Bold(((int)remaining.TotalHours).ToString()),
Format.Bold(remaining.Minutes.ToString())).ConfigureAwait(false);
}
}
private static readonly TimeSpan AffinityLimit = TimeSpan.FromMinutes(30);
private static readonly TimeSpan _affinityLimit = TimeSpan.FromMinutes(30);
[NadekoCommand, Usage, Description, Aliases]
[RequireContext(ContextType.Guild)]
public async Task WaifuClaimerAffinity([Remainder]IUser u = null)
{
if (u?.Id == Context.User.Id)
{
await Context.Channel.SendErrorAsync($"{Context.User.Mention} you can't set affinity to yourself, you egomaniac.").ConfigureAwait(false);
await ReplyErrorLocalized("waifu_egomaniac").ConfigureAwait(false);
return;
}
DiscordUser oldAff = null;
var sucess = false;
var cooldown = false;
TimeSpan difference = TimeSpan.Zero;
var difference = TimeSpan.Zero;
using (var uow = DbHandler.UnitOfWork())
{
var w = uow.Waifus.ByWaifuUserId(Context.User.Id);
@ -287,13 +282,11 @@ namespace NadekoBot.Modules.Gambling
var now = DateTime.UtcNow;
if (w?.Affinity?.UserId == u?.Id)
{
sucess = false;
}
else if (_affinityCooldowns.AddOrUpdate(Context.User.Id,
else if (affinityCooldowns.AddOrUpdate(Context.User.Id,
now,
(key, old) => ((difference = now.Subtract(old)) > AffinityLimit) ? now : old) != now)
(key, old) => ((difference = now.Subtract(old)) > _affinityLimit) ? now : old) != now)
{
sucess = false;
cooldown = true;
}
else if (w == null)
@ -338,19 +331,29 @@ namespace NadekoBot.Modules.Gambling
{
if (cooldown)
{
var remaining = AffinityLimit.Subtract(difference);
await Context.Channel.SendErrorAsync($"{Context.User.Mention} You must wait **{remaining.Hours} hours and {remaining.Minutes} minutes** in order to change your affinity again.").ConfigureAwait(false);
var remaining = _affinityLimit.Subtract(difference);
await ReplyErrorLocalized("waifu_affinity_cooldown",
Format.Bold(((int)remaining.TotalHours).ToString()),
Format.Bold(remaining.Minutes.ToString())).ConfigureAwait(false);
}
else
await Context.Channel.SendErrorAsync($"{Context.User.Mention} your affinity is already set to that waifu or you're trying to remove your affinity while not having one.").ConfigureAwait(false);
{
await ReplyErrorLocalized("waifu_affinity_already").ConfigureAwait(false);
}
return;
}
if (u == null)
await Context.Channel.SendConfirmAsync("Affinity Reset", $"{Context.User.Mention} Your affinity is reset. You no longer have a person you like.").ConfigureAwait(false);
{
await ReplyConfirmLocalized("waifu_affinity_reset").ConfigureAwait(false);
}
else if (oldAff == null)
await Context.Channel.SendConfirmAsync("Affinity Set", $"{Context.User.Mention} wants to be {u.Mention}'s waifu. Aww <3").ConfigureAwait(false);
{
await ReplyConfirmLocalized("waifu_affinity_set", Format.Bold(u.ToString())).ConfigureAwait(false);
}
else
await Context.Channel.SendConfirmAsync("Affinity Changed", $"{Context.User.Mention} changed their affinity from {oldAff} to {u.Mention}.\n\n*This is morally questionable.*🤔").ConfigureAwait(false);
{
await ReplyConfirmLocalized("waifu_affinity_changed", Format.Bold(oldAff.ToString()), Format.Bold(u.ToString())).ConfigureAwait(false);
}
}
[NadekoCommand, Usage, Description, Aliases]
@ -365,19 +368,20 @@ namespace NadekoBot.Modules.Gambling
if (waifus.Count == 0)
{
await Context.Channel.SendConfirmAsync("No waifus have been claimed yet.").ConfigureAwait(false);
await ReplyConfirmLocalized("waifu_none").ConfigureAwait(false);
return;
}
var embed = new EmbedBuilder()
.WithTitle("Top Waifus")
.WithTitle(GetText("waifus_top_waifus"))
.WithOkColor();
for (int i = 0; i < waifus.Count; i++)
for (var i = 0; i < waifus.Count; i++)
{
var w = waifus[i];
embed.AddField(efb => efb.WithName("#" + (i + 1) + " - " + w.Price + NadekoBot.BotConfig.CurrencySign).WithValue(w.ToString()).WithIsInline(false));
var j = i;
embed.AddField(efb => efb.WithName("#" + (j + 1) + " - " + w.Price + NadekoBot.BotConfig.CurrencySign).WithValue(w.ToString()).WithIsInline(false));
}
await Context.Channel.EmbedAsync(embed).ConfigureAwait(false);
@ -419,15 +423,16 @@ namespace NadekoBot.Modules.Gambling
var claimInfo = GetClaimTitle(target.Id);
var affInfo = GetAffinityTitle(target.Id);
var nobody = GetText("nobody");
var embed = new EmbedBuilder()
.WithOkColor()
.WithTitle("Waifu " + w.Waifu + " - \"the " + claimInfo.Title + "\"")
.AddField(efb => efb.WithName("Price").WithValue(w.Price.ToString()).WithIsInline(true))
.AddField(efb => efb.WithName("Claimed by").WithValue(w.Claimer?.ToString() ?? "No one").WithIsInline(true))
.AddField(efb => efb.WithName("Likes").WithValue(w.Affinity?.ToString() ?? "Nobody").WithIsInline(true))
.AddField(efb => efb.WithName("Changes Of Heart").WithValue($"{affInfo.Count} - \"the {affInfo.Title}\"").WithIsInline(true))
.AddField(efb => efb.WithName("Divorces").WithValue(divorces.ToString()).WithIsInline(true))
.AddField(efb => efb.WithName($"Waifus ({claims.Count})").WithValue(claims.Count == 0 ? "Nobody" : string.Join("\n", claims.Select(x => x.Waifu))).WithIsInline(true));
.AddField(efb => efb.WithName(GetText("price")).WithValue(w.Price.ToString()).WithIsInline(true))
.AddField(efb => efb.WithName(GetText("claimed_by")).WithValue(w.Claimer?.ToString() ?? nobody).WithIsInline(true))
.AddField(efb => efb.WithName(GetText("likes")).WithValue(w.Affinity?.ToString() ?? nobody).WithIsInline(true))
.AddField(efb => efb.WithName(GetText("changes_of_heart")).WithValue($"{affInfo.Count} - \"the {affInfo.Title}\"").WithIsInline(true))
.AddField(efb => efb.WithName(GetText("divorces")).WithValue(divorces.ToString()).WithIsInline(true))
.AddField(efb => efb.WithName($"Waifus ({claims.Count})").WithValue(claims.Count == 0 ? nobody : string.Join("\n", claims.Select(x => x.Waifu))).WithIsInline(true));
await Context.Channel.EmbedAsync(embed).ConfigureAwait(false);
}
@ -447,13 +452,13 @@ namespace NadekoBot.Modules.Gambling
private static WaifuProfileTitle GetClaimTitle(ulong userId)
{
int count = 0;
int count;
using (var uow = DbHandler.UnitOfWork())
{
count = uow.Waifus.ByClaimerUserId(userId).Count;
}
ClaimTitles title = ClaimTitles.Lonely;
ClaimTitles title;
if (count == 0)
title = ClaimTitles.Lonely;
else if (count == 1)
@ -484,13 +489,13 @@ namespace NadekoBot.Modules.Gambling
private static WaifuProfileTitle GetAffinityTitle(ulong userId)
{
int count = 0;
int count;
using (var uow = DbHandler.UnitOfWork())
{
count = uow._context.WaifuUpdates.Count(w => w.User.UserId == userId && w.UpdateType == WaifuUpdateType.AffinityChanged);
}
AffinityTitles title = AffinityTitles.Pure;
AffinityTitles title;
if (count < 1)
title = AffinityTitles.Pure;
else if (count < 2)

View File

@ -240,9 +240,7 @@ namespace NadekoBot.Modules.Gambling
(int) (amount * NadekoBot.BotConfig.Betroll100Multiplier), false).ConfigureAwait(false);
}
}
Console.WriteLine("started sending");
await Context.Channel.SendConfirmAsync(str).ConfigureAwait(false);
Console.WriteLine("done sending");
}
[NadekoCommand, Usage, Description, Aliases]

View File

@ -28,6 +28,8 @@ namespace NadekoBot.Modules.Games
[RequireContext(ContextType.Guild)]
public async Task Acro(int time = 60)
{
if (time < 10 || time > 120)
return;
var channel = (ITextChannel)Context.Channel;
var game = new AcrophobiaGame(channel, time);

View File

@ -9,8 +9,9 @@ using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using NadekoBot.Modules.Games.Commands.Hangman;
namespace NadekoBot.Modules.Games.Commands.Hangman
namespace NadekoBot.Modules.Games.Hangman
{
public class HangmanTermPool
{
@ -70,7 +71,7 @@ namespace NadekoBot.Modules.Games.Commands.Hangman
return $" {c}";
c = char.ToUpperInvariant(c);
return Guesses.Contains(c) ? $" {c}" : " _";
return Guesses.Contains(c) ? $" {c}" : " ";
})) + "`";
public bool GuessedAll => Guesses.IsSupersetOf(Term.Word.ToUpperInvariant()
@ -145,7 +146,7 @@ namespace NadekoBot.Modules.Games.Commands.Hangman
MessagesSinceLastPost = 0;
++Errors;
if (Errors < MaxErrors)
await GameChannel.SendErrorAsync("Hangman Game", $"{msg.Author.Mention} Letter `{guess}` has already been used.\n" + ScrambledWord + "\n" + GetHangman(),
await GameChannel.SendErrorAsync("Hangman Game", $"{msg.Author} Letter `{guess}` has already been used.\n" + ScrambledWord + "\n" + GetHangman(),
footer: string.Join(" ", Guesses)).ConfigureAwait(false);
else
await End().ConfigureAwait(false);
@ -158,7 +159,7 @@ namespace NadekoBot.Modules.Games.Commands.Hangman
{
if (GuessedAll)
{
try { await GameChannel.SendConfirmAsync("Hangman Game", $"{msg.Author.Mention} guessed a letter `{guess}`!").ConfigureAwait(false); } catch { }
try { await GameChannel.SendConfirmAsync("Hangman Game", $"{msg.Author} guessed a letter `{guess}`!").ConfigureAwait(false); } catch { }
await End().ConfigureAwait(false);
return;
@ -166,7 +167,7 @@ namespace NadekoBot.Modules.Games.Commands.Hangman
MessagesSinceLastPost = 0;
try
{
await GameChannel.SendConfirmAsync("Hangman Game", $"{msg.Author.Mention} guessed a letter `{guess}`!\n" + ScrambledWord + "\n" + GetHangman(),
await GameChannel.SendConfirmAsync("Hangman Game", $"{msg.Author} guessed a letter `{guess}`!\n" + ScrambledWord + "\n" + GetHangman(),
footer: string.Join(" ", Guesses)).ConfigureAwait(false);
}
catch { }
@ -177,7 +178,7 @@ namespace NadekoBot.Modules.Games.Commands.Hangman
MessagesSinceLastPost = 0;
++Errors;
if (Errors < MaxErrors)
await GameChannel.SendErrorAsync("Hangman Game", $"{msg.Author.Mention} Letter `{guess}` does not exist.\n" + ScrambledWord + "\n" + GetHangman(),
await GameChannel.SendErrorAsync("Hangman Game", $"{msg.Author} Letter `{guess}` does not exist.\n" + ScrambledWord + "\n" + GetHangman(),
footer: string.Join(" ", Guesses)).ConfigureAwait(false);
else
await End().ConfigureAwait(false);

View File

@ -6,6 +6,7 @@ using NLog;
using System;
using System.Collections.Concurrent;
using System.Threading.Tasks;
using NadekoBot.Modules.Games.Hangman;
namespace NadekoBot.Modules.Games
{

View File

@ -45,10 +45,9 @@ namespace NadekoBot.Modules.Games
{
if (p == 0)
return "🚀";
else if (p == 1)
if (p == 1)
return "📎";
else
return "✂️";
return "✂️";
};
int pick;

View File

@ -127,7 +127,7 @@ namespace NadekoBot.Modules.Searches
.WithIconUrl("http://i.imgur.com/G46fm8J.png"))
.WithDescription(res.Link)
.WithImageUrl(res.Link)
.WithTitle(Context.User.Mention);
.WithTitle(Context.User.ToString());
await Context.Channel.EmbedAsync(embed).ConfigureAwait(false);
}
catch
@ -157,7 +157,7 @@ namespace NadekoBot.Modules.Searches
.WithIconUrl("http://s.imgur.com/images/logo-1200-630.jpg?"))
.WithDescription(source)
.WithImageUrl(source)
.WithTitle(Context.User.Mention);
.WithTitle(Context.User.ToString());
await Context.Channel.EmbedAsync(embed).ConfigureAwait(false);
}
}
@ -179,7 +179,7 @@ namespace NadekoBot.Modules.Searches
.WithIconUrl("http://i.imgur.com/G46fm8J.png"))
.WithDescription(res.Link)
.WithImageUrl(res.Link)
.WithTitle(Context.User.Mention);
.WithTitle(Context.User.ToString());
await Context.Channel.EmbedAsync(embed).ConfigureAwait(false);
}
catch
@ -210,7 +210,7 @@ namespace NadekoBot.Modules.Searches
.WithIconUrl("http://s.imgur.com/images/logo-1200-630.jpg?"))
.WithDescription(source)
.WithImageUrl(source)
.WithTitle(Context.User.Mention);
.WithTitle(Context.User.ToString());
await Context.Channel.EmbedAsync(embed).ConfigureAwait(false);
}
}

View File

@ -2072,6 +2072,96 @@ namespace NadekoBot.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Animal Race.
/// </summary>
public static string gambling_animal_race {
get {
return ResourceManager.GetString("gambling_animal_race", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Failed to start since there was not enough participants..
/// </summary>
public static string gambling_animal_race_failed {
get {
return ResourceManager.GetString("gambling_animal_race_failed", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Race is full! Starting immediately..
/// </summary>
public static string gambling_animal_race_full {
get {
return ResourceManager.GetString("gambling_animal_race_full", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} joined as a {1}.
/// </summary>
public static string gambling_animal_race_join {
get {
return ResourceManager.GetString("gambling_animal_race_join", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} joined as a {1} and bet {2}!.
/// </summary>
public static string gambling_animal_race_join_bet {
get {
return ResourceManager.GetString("gambling_animal_race_join_bet", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Type {0}jr to join the race..
/// </summary>
public static string gambling_animal_race_join_instr {
get {
return ResourceManager.GetString("gambling_animal_race_join_instr", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Starting in 20 seconds or when the room is full..
/// </summary>
public static string gambling_animal_race_starting {
get {
return ResourceManager.GetString("gambling_animal_race_starting", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Starting with {0} participants..
/// </summary>
public static string gambling_animal_race_starting_with_x {
get {
return ResourceManager.GetString("gambling_animal_race_starting_with_x", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} as {1} Won the race!.
/// </summary>
public static string gambling_animal_race_won {
get {
return ResourceManager.GetString("gambling_animal_race_won", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to {0} as {1} Won the race and {2}!.
/// </summary>
public static string gambling_animal_race_won_money {
get {
return ResourceManager.GetString("gambling_animal_race_won_money", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to has awarded {0} to {1}.
/// </summary>
@ -2108,6 +2198,24 @@ namespace NadekoBot.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Changes Of Heart.
/// </summary>
public static string gambling_changes_of_heart {
get {
return ResourceManager.GetString("gambling_changes_of_heart", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Claimed By.
/// </summary>
public static string gambling_claimed_by {
get {
return ResourceManager.GetString("gambling_claimed_by", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Deck reshuffled..
/// </summary>
@ -2117,6 +2225,42 @@ namespace NadekoBot.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Invalid number specified. You can roll up to {0}-{1} dice at a time..
/// </summary>
public static string gambling_dice_invalid_number {
get {
return ResourceManager.GetString("gambling_dice_invalid_number", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to rolled {0}.
/// </summary>
public static string gambling_dice_rolled {
get {
return ResourceManager.GetString("gambling_dice_rolled", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Dice rolled: {1}.
/// </summary>
public static string gambling_dice_rolled_num {
get {
return ResourceManager.GetString("gambling_dice_rolled_num", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Divorces.
/// </summary>
public static string gambling_divorces {
get {
return ResourceManager.GetString("gambling_divorces", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to You guessed it! You won {0}.
/// </summary>
@ -2207,6 +2351,15 @@ namespace NadekoBot.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Likes.
/// </summary>
public static string gambling_likes {
get {
return ResourceManager.GetString("gambling_likes", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Awarded {0} to {1} users from {2} role..
/// </summary>
@ -2243,6 +2396,15 @@ namespace NadekoBot.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Nobody.
/// </summary>
public static string gambling_nobody {
get {
return ResourceManager.GetString("gambling_nobody", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to You don&apos;t have enough {0}.
/// </summary>
@ -2252,6 +2414,33 @@ namespace NadekoBot.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Price.
/// </summary>
public static string gambling_price {
get {
return ResourceManager.GetString("gambling_price", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Failed starting the race. Another race is probably running..
/// </summary>
public static string gambling_race_failed_starting {
get {
return ResourceManager.GetString("gambling_race_failed_starting", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to No race exists on this server.
/// </summary>
public static string gambling_race_not_exist {
get {
return ResourceManager.GetString("gambling_race_not_exist", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Raffled User.
/// </summary>
@ -2270,6 +2459,15 @@ namespace NadekoBot.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to Second number must be larger than the first one..
/// </summary>
public static string gambling_second_larger_than_first {
get {
return ResourceManager.GetString("gambling_second_larger_than_first", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Bet.
/// </summary>
@ -2379,6 +2577,163 @@ namespace NadekoBot.Resources {
}
}
/// <summary>
/// Looks up a localized string similar to your affinity is already set to that waifu or you&apos;re trying to remove your affinity while not having one..
/// </summary>
public static string gambling_waifu_affinity_already {
get {
return ResourceManager.GetString("gambling_waifu_affinity_already", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to changed their affinity from {0} to {1}.
///
///*This is morally questionable.*🤔.
/// </summary>
public static string gambling_waifu_affinity_changed {
get {
return ResourceManager.GetString("gambling_waifu_affinity_changed", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to You must wait {0} hours and {1} minutes in order to change your affinity again..
/// </summary>
public static string gambling_waifu_affinity_cooldown {
get {
return ResourceManager.GetString("gambling_waifu_affinity_cooldown", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Your affinity is reset. You no longer have a person you like..
/// </summary>
public static string gambling_waifu_affinity_reset {
get {
return ResourceManager.GetString("gambling_waifu_affinity_reset", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to wants to be {0}&apos;s waifu. Aww &lt;3.
/// </summary>
public static string gambling_waifu_affinity_set {
get {
return ResourceManager.GetString("gambling_waifu_affinity_set", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to claimed {0} as their waifu for {1}!.
/// </summary>
public static string gambling_waifu_claimed {
get {
return ResourceManager.GetString("gambling_waifu_claimed", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to You have divorced a waifu who likes you. You heartless monster.
///{0} received {1} as a compensation..
/// </summary>
public static string gambling_waifu_divorced_like {
get {
return ResourceManager.GetString("gambling_waifu_divorced_like", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to You have divorced a waifu who doesn&apos;t like you. You received {0} back..
/// </summary>
public static string gambling_waifu_divorced_not_like {
get {
return ResourceManager.GetString("gambling_waifu_divorced_not_like", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to you can&apos;t set affinity to yourself, you egomaniac..
/// </summary>
public static string gambling_waifu_egomaniac {
get {
return ResourceManager.GetString("gambling_waifu_egomaniac", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to 🎉 Their love is fulfilled! 🎉
///{0}&apos;s new value is {1}!.
/// </summary>
public static string gambling_waifu_fulfilled {
get {
return ResourceManager.GetString("gambling_waifu_fulfilled", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to No waifu is that cheap. You must pay at least {0} to get a waifu, even if their actual value is lower..
/// </summary>
public static string gambling_waifu_isnt_cheap {
get {
return ResourceManager.GetString("gambling_waifu_isnt_cheap", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to You must pay {0} or more to claim that waifu!.
/// </summary>
public static string gambling_waifu_not_enough {
get {
return ResourceManager.GetString("gambling_waifu_not_enough", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to That waifu is not yours..
/// </summary>
public static string gambling_waifu_not_yours {
get {
return ResourceManager.GetString("gambling_waifu_not_yours", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to You can&apos;t claim yourself..
/// </summary>
public static string gambling_waifu_not_yourself {
get {
return ResourceManager.GetString("gambling_waifu_not_yourself", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to You divorced recently. You must wait {0} hours and {1} minutes to divorce again..
/// </summary>
public static string gambling_waifu_recent_divorce {
get {
return ResourceManager.GetString("gambling_waifu_recent_divorce", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to No waifus have been claimed yet..
/// </summary>
public static string gambling_waifus_none {
get {
return ResourceManager.GetString("gambling_waifus_none", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Top Waifus.
/// </summary>
public static string gambling_waifus_top_waifus {
get {
return ResourceManager.GetString("gambling_waifus_top_waifus", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Back to ToC.
/// </summary>

View File

@ -1043,4 +1043,125 @@ Don't forget to leave your discord name or id in the message.
<data name="nsfw_tag" xml:space="preserve">
<value>Tag</value>
</data>
<data name="gambling_animal_race" xml:space="preserve">
<value>Animal Race</value>
</data>
<data name="gambling_animal_race_failed" xml:space="preserve">
<value>Failed to start since there was not enough participants.</value>
</data>
<data name="gambling_animal_race_full" xml:space="preserve">
<value>Race is full! Starting immediately.</value>
</data>
<data name="gambling_animal_race_join" xml:space="preserve">
<value>{0} joined as a {1}</value>
</data>
<data name="gambling_animal_race_join_bet" xml:space="preserve">
<value>{0} joined as a {1} and bet {2}!</value>
</data>
<data name="gambling_animal_race_join_instr" xml:space="preserve">
<value>Type {0}jr to join the race.</value>
</data>
<data name="gambling_animal_race_starting" xml:space="preserve">
<value>Starting in 20 seconds or when the room is full.</value>
</data>
<data name="gambling_animal_race_starting_with_x" xml:space="preserve">
<value>Starting with {0} participants.</value>
</data>
<data name="gambling_animal_race_won" xml:space="preserve">
<value>{0} as {1} Won the race!</value>
</data>
<data name="gambling_animal_race_won_money" xml:space="preserve">
<value>{0} as {1} Won the race and {2}!</value>
</data>
<data name="gambling_dice_invalid_number" xml:space="preserve">
<value>Invalid number specified. You can roll up to {0}-{1} dice at a time.</value>
</data>
<data name="gambling_dice_rolled" xml:space="preserve">
<value>rolled {0}</value>
<comment>Someone rolled 35</comment>
</data>
<data name="gambling_dice_rolled_num" xml:space="preserve">
<value>Dice rolled: {1}</value>
<comment>Dice Rolled: 5</comment>
</data>
<data name="gambling_race_failed_starting" xml:space="preserve">
<value>Failed starting the race. Another race is probably running.</value>
</data>
<data name="gambling_race_not_exist" xml:space="preserve">
<value>No race exists on this server</value>
</data>
<data name="gambling_second_larger_than_first" xml:space="preserve">
<value>Second number must be larger than the first one.</value>
</data>
<data name="gambling_changes_of_heart" xml:space="preserve">
<value>Changes Of Heart</value>
</data>
<data name="gambling_claimed_by" xml:space="preserve">
<value>Claimed By</value>
</data>
<data name="gambling_divorces" xml:space="preserve">
<value>Divorces</value>
</data>
<data name="gambling_likes" xml:space="preserve">
<value>Likes</value>
</data>
<data name="gambling_price" xml:space="preserve">
<value>Price</value>
</data>
<data name="gambling_waifus_none" xml:space="preserve">
<value>No waifus have been claimed yet.</value>
</data>
<data name="gambling_waifus_top_waifus" xml:space="preserve">
<value>Top Waifus</value>
</data>
<data name="gambling_waifu_affinity_already" xml:space="preserve">
<value>your affinity is already set to that waifu or you're trying to remove your affinity while not having one.</value>
</data>
<data name="gambling_waifu_affinity_changed" xml:space="preserve">
<value>changed their affinity from {0} to {1}.
*This is morally questionable.*🤔</value>
<comment>Make sure to get the formatting right, and leave the thinking emoji</comment>
</data>
<data name="gambling_waifu_affinity_cooldown" xml:space="preserve">
<value>You must wait {0} hours and {1} minutes in order to change your affinity again.</value>
</data>
<data name="gambling_waifu_affinity_reset" xml:space="preserve">
<value>Your affinity is reset. You no longer have a person you like.</value>
</data>
<data name="gambling_waifu_affinity_set" xml:space="preserve">
<value>wants to be {0}'s waifu. Aww &lt;3</value>
</data>
<data name="gambling_waifu_claimed" xml:space="preserve">
<value>claimed {0} as their waifu for {1}!</value>
</data>
<data name="gambling_waifu_divorced_like" xml:space="preserve">
<value>You have divorced a waifu who likes you. You heartless monster.
{0} received {1} as a compensation.</value>
</data>
<data name="gambling_waifu_divorced_not_like" xml:space="preserve">
<value>You have divorced a waifu who doesn't like you. You received {0} back.</value>
</data>
<data name="gambling_waifu_egomaniac" xml:space="preserve">
<value>you can't set affinity to yourself, you egomaniac.</value>
</data>
<data name="gambling_waifu_fulfilled" xml:space="preserve">
<value>🎉 Their love is fulfilled! 🎉
{0}'s new value is {1}!</value>
</data>
<data name="gambling_waifu_isnt_cheap" xml:space="preserve">
<value>No waifu is that cheap. You must pay at least {0} to get a waifu, even if their actual value is lower.</value>
</data>
<data name="gambling_waifu_not_enough" xml:space="preserve">
<value>You must pay {0} or more to claim that waifu!</value>
</data>
<data name="gambling_waifu_not_yours" xml:space="preserve">
<value>That waifu is not yours.</value>
</data>
<data name="gambling_waifu_not_yourself" xml:space="preserve">
<value>You can't claim yourself.</value>
</data>
<data name="gambling_waifu_recent_divorce" xml:space="preserve">
<value>You divorced recently. You must wait {0} hours and {1} minutes to divorce again.</value>
</data>
</root>

View File

@ -250,9 +250,6 @@
<data name="clashofclans_war_started" xml:space="preserve">
<value>Рат против {0} је започет!</value>
</data>
<data name="clasofclans_base_destroyed" xml:space="preserve">
<value>је **УНИШТИО** базу #{0} у рату против {1}</value>
</data>
<data name="customreactions_all_stats_cleared" xml:space="preserve">
<value>Сва статистика Реакција по Избору је обрисана.</value>
</data>
@ -359,10 +356,691 @@
<data name="nsfw_autohentai_stopped" xml:space="preserve">
<value>АутоХентаи заустављен.</value>
</data>
<data name="nsfw_no_results" xml:space="preserve">
<value>Нема резултата.</value>
</data>
<data name="nsfw_tag" xml:space="preserve">
<value>Таг</value>
</data>
<data name="clashofclans_base_destroyed" xml:space="preserve">
<value>**DESTROYED** base #{0} in a war against {1}</value>
</data>
<data name="nsfw_not_found" xml:space="preserve">
<value>No results found.</value>
</data>
<data name="administration_aar_disabled" xml:space="preserve">
<value>**Auto assign role** on user join is now **disabled**.</value>
</data>
<data name="administration_aar_enabled" xml:space="preserve">
<value>**Auto assign role** on user join is now **enabled**.</value>
</data>
<data name="administration_attachments" xml:space="preserve">
<value>Attachments</value>
</data>
<data name="administration_avatar_changed" xml:space="preserve">
<value>Avatar Changed</value>
</data>
<data name="administration_bandm" xml:space="preserve">
<value>You have been banned from {0} server.
Reason: {1}</value>
</data>
<data name="administration_banned_pl" xml:space="preserve">
<value>banned</value>
<comment>PLURAL</comment>
</data>
<data name="administration_banned_user" xml:space="preserve">
<value>User Banned</value>
</data>
<data name="administration_bot_name" xml:space="preserve">
<value>Bot name changed to {0}</value>
</data>
<data name="administration_bot_status" xml:space="preserve">
<value>Bot status changed to {0}</value>
</data>
<data name="administration_byedel_off" xml:space="preserve">
<value>Automatic deletion of bye messages has been disabled.</value>
</data>
<data name="administration_byedel_on" xml:space="preserve">
<value>Bye messages will be deleted after {0} seconds.</value>
</data>
<data name="administration_byemsg_cur" xml:space="preserve">
<value>Current bye message: {0}</value>
</data>
<data name="administration_byemsg_enable" xml:space="preserve">
<value>Enable bye messages by typing {0}</value>
</data>
<data name="administration_byemsg_new" xml:space="preserve">
<value>New bye message set.</value>
</data>
<data name="administration_bye_off" xml:space="preserve">
<value>Bye announcements disabled.</value>
</data>
<data name="administration_bye_on" xml:space="preserve">
<value>Bye announcements enabled on this channel.</value>
</data>
<data name="administration_ch_name_change" xml:space="preserve">
<value>Channel Name Changed</value>
</data>
<data name="administration_ch_old_name" xml:space="preserve">
<value>Old Name</value>
</data>
<data name="administration_ch_topic_change" xml:space="preserve">
<value>Channel Topic Changed</value>
</data>
<data name="administration_cleaned_up" xml:space="preserve">
<value>Cleaned up.</value>
</data>
<data name="administration_content" xml:space="preserve">
<value>Content</value>
</data>
<data name="administration_cr" xml:space="preserve">
<value>Sucessfully created role {0}</value>
</data>
<data name="administration_createtextchan" xml:space="preserve">
<value>Text channel {0} created.</value>
</data>
<data name="administration_createvoich" xml:space="preserve">
<value>Voice channel {0} created.</value>
</data>
<data name="administration_deafen" xml:space="preserve">
<value>Deafen successful.</value>
</data>
<data name="administration_deleted_server" xml:space="preserve">
<value>Deleted server {0}</value>
</data>
<data name="administration_delmsg_off" xml:space="preserve">
<value>Stopped automatic deletion of successful command invokations.</value>
</data>
<data name="administration_delmsg_on" xml:space="preserve">
<value>Now automatically deleting sucessful command invokations.</value>
</data>
<data name="administration_deltextchan" xml:space="preserve">
<value>Text channel {0} deleted.</value>
</data>
<data name="administration_delvoich" xml:space="preserve">
<value>Voice channel {0} deleted.</value>
</data>
<data name="administration_dm_from" xml:space="preserve">
<value>DM from</value>
</data>
<data name="administration_donadd" xml:space="preserve">
<value>Sucessfully added a new donator.Total donated amount from this user: {0} 👑</value>
</data>
<data name="administration_donators" xml:space="preserve">
<value>Thanks to the people listed below for making this project hjappen!</value>
</data>
<data name="administration_fwall_start" xml:space="preserve">
<value>I will forward DMs to all owners.</value>
</data>
<data name="administration_fwall_stop" xml:space="preserve">
<value>I will forward DMs only to the first owner.</value>
</data>
<data name="administration_fwdm_start" xml:space="preserve">
<value>I will forward DMs from now on.</value>
</data>
<data name="administration_fwdm_stop" xml:space="preserve">
<value>I will stop forwarding DMs from now on.</value>
</data>
<data name="administration_greetdel_off" xml:space="preserve">
<value>Automatic deletion of greet messages has been disabled.</value>
</data>
<data name="administration_greetdel_on" xml:space="preserve">
<value>Greet messages will be deleted after {0} seconds.</value>
</data>
<data name="administration_greetdmmsg_cur" xml:space="preserve">
<value>Current DM greet message: {0}</value>
</data>
<data name="administration_greetdmmsg_enable" xml:space="preserve">
<value>Enable DM greet messages by typing {0}</value>
</data>
<data name="administration_greetdmmsg_new" xml:space="preserve">
<value>New DM greet message set.</value>
</data>
<data name="administration_greetdm_off" xml:space="preserve">
<value>DM greet announcements disabled.</value>
</data>
<data name="administration_greetdm_on" xml:space="preserve">
<value>DM greet announcements enabled.</value>
</data>
<data name="administration_greetmsg_cur" xml:space="preserve">
<value>Current greet message: {0}</value>
</data>
<data name="administration_greetmsg_enable" xml:space="preserve">
<value>Enable greet messages by typing {0}</value>
</data>
<data name="administration_greetmsg_new" xml:space="preserve">
<value>New greet message set.</value>
</data>
<data name="administration_greet_off" xml:space="preserve">
<value>Greet announcements disabled.</value>
</data>
<data name="administration_greet_on" xml:space="preserve">
<value>Greet announcements enabled on this channel.</value>
</data>
<data name="administration_hierarchy" xml:space="preserve">
<value>You can't use this command on users with a role higher or equal to yours in the role hierarchy.</value>
</data>
<data name="administration_images_loaded" xml:space="preserve">
<value>Images loaded after {0} seconds!</value>
</data>
<data name="administration_invalid_format" xml:space="preserve">
<value>Invalid input format.</value>
</data>
<data name="administration_invalid_params" xml:space="preserve">
<value>Invalid parameters.</value>
</data>
<data name="administration_joined" xml:space="preserve">
<value>{0} has joined {1}</value>
</data>
<data name="administration_kickdm" xml:space="preserve">
<value>You have been kicked from {0} server.
Reason: {1}</value>
</data>
<data name="administration_kicked_user" xml:space="preserve">
<value>User Kicked</value>
</data>
<data name="administration_lang_list" xml:space="preserve">
<value>List Of Languages
{0}</value>
</data>
<data name="administration_lang_set" xml:space="preserve">
<value>Your server's locale is now {0} - {1}</value>
</data>
<data name="administration_lang_set_bot" xml:space="preserve">
<value>Bot's default locale is now {0} - {1}</value>
</data>
<data name="administration_lang_set_bot_show" xml:space="preserve">
<value>Bot's language is set to {0} - {0}</value>
</data>
<data name="administration_lang_set_fail" xml:space="preserve">
<value>Failed setting locale. Revisit this command's help.</value>
</data>
<data name="administration_lang_set_show" xml:space="preserve">
<value>This server's language is set to {0} - {0}</value>
</data>
<data name="administration_left" xml:space="preserve">
<value>{0} has left {1}</value>
</data>
<data name="administration_left_server" xml:space="preserve">
<value>Left server {0}</value>
</data>
<data name="administration_log" xml:space="preserve">
<value>Logging {0} event in this channel.</value>
</data>
<data name="administration_log_all" xml:space="preserve">
<value>Logging all events in this channel.</value>
</data>
<data name="administration_log_disabled" xml:space="preserve">
<value>Logging disabled.</value>
</data>
<data name="administration_log_events" xml:space="preserve">
<value>Log events you can subscribe to:</value>
</data>
<data name="administration_log_ignore" xml:space="preserve">
<value>Logging will ignore {0}</value>
</data>
<data name="administration_log_not_ignore" xml:space="preserve">
<value>Logging will not ignore {0}</value>
</data>
<data name="administration_log_stop" xml:space="preserve">
<value>Stopped logging {0} event.</value>
</data>
<data name="administration_menrole" xml:space="preserve">
<value>{0} has invoked a mention on the following roles</value>
</data>
<data name="administration_message_from_bo" xml:space="preserve">
<value>Message from {0} `[Bot Owner]`:</value>
</data>
<data name="administration_message_sent" xml:space="preserve">
<value>Message sent.</value>
</data>
<data name="administration_moved" xml:space="preserve">
<value>{0} moved from {1} to {2}</value>
</data>
<data name="administration_msg_del" xml:space="preserve">
<value>Message Deleted in #{0}</value>
</data>
<data name="administration_msg_update" xml:space="preserve">
<value>Message Updated in #{0}</value>
</data>
<data name="administration_muted_pl" xml:space="preserve">
<value>Muted</value>
<comment>PLURAL (users have been muted)</comment>
</data>
<data name="administration_muted_sn" xml:space="preserve">
<value>Muted</value>
<comment>singular "User muted."</comment>
</data>
<data name="administration_mute_error" xml:space="preserve">
<value>I don't have the permission necessary for that most likely.</value>
</data>
<data name="administration_mute_role_set" xml:space="preserve">
<value>New mute role set.</value>
</data>
<data name="administration_need_admin" xml:space="preserve">
<value>I need **Administration** permission to do that.</value>
</data>
<data name="administration_new_msg" xml:space="preserve">
<value>New Message</value>
</data>
<data name="administration_new_nick" xml:space="preserve">
<value>New Nickname</value>
</data>
<data name="administration_new_topic" xml:space="preserve">
<value>New Topic</value>
</data>
<data name="administration_nick_change" xml:space="preserve">
<value>Nickname Changed</value>
</data>
<data name="administration_no_server" xml:space="preserve">
<value>Can't find that server</value>
</data>
<data name="administration_no_shard_id" xml:space="preserve">
<value>No shard with that ID found.</value>
</data>
<data name="administration_old_msg" xml:space="preserve">
<value>Old Message</value>
</data>
<data name="administration_old_nick" xml:space="preserve">
<value>Old Nickname</value>
</data>
<data name="administration_old_topic" xml:space="preserve">
<value>Old Topic</value>
</data>
<data name="administration_perms" xml:space="preserve">
<value>Error. Most likely I don't have sufficient permissions.</value>
</data>
<data name="administration_perms_reset" xml:space="preserve">
<value>Permissions for this server are reset.</value>
</data>
<data name="administration_prot_active" xml:space="preserve">
<value>Active Protections</value>
</data>
<data name="administration_prot_disable" xml:space="preserve">
<value>{0} has been **disabled** on this server.</value>
</data>
<data name="administration_prot_enable" xml:space="preserve">
<value>{0} Enabled</value>
</data>
<data name="administration_prot_error" xml:space="preserve">
<value>Error. I need ManageRoles permission</value>
</data>
<data name="administration_prot_none" xml:space="preserve">
<value>No protections enabled.</value>
</data>
<data name="administration_raid_cnt" xml:space="preserve">
<value>User threshold must be between {0} and {1}.</value>
</data>
<data name="administration_raid_stats" xml:space="preserve">
<value>If {0} or more users join within {1} seconds, I will {2} them.</value>
</data>
<data name="administration_raid_time" xml:space="preserve">
<value>Time must be between {0} and {1} seconds.</value>
</data>
<data name="administration_rar" xml:space="preserve">
<value>Successfully removed all roles from user {0}</value>
</data>
<data name="administration_rar_err" xml:space="preserve">
<value>Failed to remove roles. I have insufficient permissions.</value>
</data>
<data name="administration_rc" xml:space="preserve">
<value>Color of {0} role has been changed.</value>
</data>
<data name="administration_rc_not_exist" xml:space="preserve">
<value>That role does not exist.</value>
</data>
<data name="administration_rc_params" xml:space="preserve">
<value>The parameters specified are invalid.</value>
</data>
<data name="administration_rc_perms" xml:space="preserve">
<value>Error occured due to invalid color or insufficient permissions.</value>
</data>
<data name="administration_remrole" xml:space="preserve">
<value>Successfully removed role {0} from user {1}</value>
</data>
<data name="administration_remrole_err" xml:space="preserve">
<value>Failed to remove role. I have insufficient permissions.</value>
</data>
<data name="administration_renrole" xml:space="preserve">
<value>Role renamed.</value>
</data>
<data name="administration_renrole_err" xml:space="preserve">
<value>Failed to rename role. I have insufficient permissions.</value>
</data>
<data name="administration_renrole_perms" xml:space="preserve">
<value>You can't edit roles higher than your highest role.</value>
</data>
<data name="administration_reprm" xml:space="preserve">
<value>Removed the playing message: {0}</value>
</data>
<data name="administration_role_added" xml:space="preserve">
<value>Role {0} as been added to the list.</value>
</data>
<data name="administration_role_clean" xml:space="preserve">
<value>{0} not found.Cleaned up.</value>
</data>
<data name="administration_role_in_list" xml:space="preserve">
<value>Role {0} is already in the list.</value>
</data>
<data name="administration_ropl_added" xml:space="preserve">
<value>Added.</value>
</data>
<data name="administration_ropl_disabled" xml:space="preserve">
<value>Rotating playing status disabled.</value>
</data>
<data name="administration_ropl_enabled" xml:space="preserve">
<value>Rotating playing status enabled.</value>
</data>
<data name="administration_ropl_list" xml:space="preserve">
<value>Here is a list of rotating statuses:
{0}</value>
</data>
<data name="administration_ropl_not_set" xml:space="preserve">
<value>No rotating playing statuses set.</value>
</data>
<data name="administration_self_assign_already" xml:space="preserve">
<value>You already have {0} role.</value>
</data>
<data name="administration_self_assign_already_excl" xml:space="preserve">
<value>You already have {0} exclusive self-assigned role.</value>
</data>
<data name="administration_self_assign_excl" xml:space="preserve">
<value>Self assigned roles are now exclusive!</value>
</data>
<data name="administration_self_assign_list" xml:space="preserve">
<value>There are {0} self assignable roles</value>
</data>
<data name="administration_self_assign_not" xml:space="preserve">
<value>That role is not self-assignable.</value>
</data>
<data name="administration_self_assign_not_have" xml:space="preserve">
<value>You don't have {0} role.</value>
</data>
<data name="administration_self_assign_no_excl" xml:space="preserve">
<value>Self assigned roles are now not exclusive!</value>
</data>
<data name="administration_self_assign_perms" xml:space="preserve">
<value>I am unable to add that role to you. `I can't add roles to owners or other roles higher than my role in the role hierarchy.`</value>
</data>
<data name="administration_self_assign_rem" xml:space="preserve">
<value>{0} has been removed from the list of self-assignable roles.</value>
</data>
<data name="administration_self_assign_remove" xml:space="preserve">
<value>You no longer have {0} role.</value>
</data>
<data name="administration_self_assign_success" xml:space="preserve">
<value>You now have {0} role.</value>
</data>
<data name="administration_setrole" xml:space="preserve">
<value>Sucessfully added role {0} to user {1}</value>
</data>
<data name="administration_setrole_err" xml:space="preserve">
<value>Failed to add role. I have insufficient permissions.</value>
</data>
<data name="administration_set_avatar" xml:space="preserve">
<value>New avatar set!</value>
</data>
<data name="administration_set_channel_name" xml:space="preserve">
<value>New channel name set.</value>
</data>
<data name="administration_set_game" xml:space="preserve">
<value>New game set!</value>
</data>
<data name="administration_set_stream" xml:space="preserve">
<value>New stream set!</value>
</data>
<data name="administration_set_topic" xml:space="preserve">
<value>New channel topic set.</value>
</data>
<data name="administration_shard_reconnected" xml:space="preserve">
<value>Shard {0} reconnected.</value>
</data>
<data name="administration_shard_reconnecting" xml:space="preserve">
<value>Shard {0} reconnecting.</value>
</data>
<data name="administration_shutting_down" xml:space="preserve">
<value>Shutting down</value>
</data>
<data name="administration_slowmode_desc" xml:space="preserve">
<value>Users can't send more than {0} messages every {1} seconds.</value>
</data>
<data name="administration_slowmode_disabled" xml:space="preserve">
<value>Slow mode disabled.</value>
</data>
<data name="administration_slowmode_init" xml:space="preserve">
<value>Slow mode initiated</value>
</data>
<data name="administration_soft_banned_pl" xml:space="preserve">
<value>soft-banned (kicked)</value>
<comment>PLURAL</comment>
</data>
<data name="administration_spam_ignore" xml:space="preserve">
<value>{0} will ignore this channel.</value>
</data>
<data name="administration_spam_not_ignore" xml:space="preserve">
<value>{0} will no longer ignore this channel.</value>
</data>
<data name="administration_spam_stats" xml:space="preserve">
<value>If a user posts {0} same messages in a row, I will {1} them.
__IgnoredChannels__: {2}</value>
</data>
<data name="administration_text_chan_created" xml:space="preserve">
<value>Text Channel Destroyed </value>
</data>
<data name="administration_text_chan_destroyed" xml:space="preserve">
<value>Text Channel Destroyed </value>
</data>
<data name="administration_undeafen" xml:space="preserve">
<value>Undeafen successful.</value>
</data>
<data name="administration_unmuted_sn" xml:space="preserve">
<value>Unmuted</value>
<comment>singular</comment>
</data>
<data name="administration_username" xml:space="preserve">
<value>Username</value>
</data>
<data name="administration_username_changed" xml:space="preserve">
<value>Username Changed</value>
</data>
<data name="administration_users" xml:space="preserve">
<value>Users</value>
</data>
<data name="administration_user_banned" xml:space="preserve">
<value>User Banned</value>
</data>
<data name="administration_user_chat_mute" xml:space="preserve">
<value>{0} has been **muted** from chatting.</value>
</data>
<data name="administration_user_chat_unmute" xml:space="preserve">
<value>{0} has been **unmuted** from chatting.</value>
</data>
<data name="administration_user_joined" xml:space="preserve">
<value>User Joined</value>
</data>
<data name="administration_user_left" xml:space="preserve">
<value>User Left</value>
</data>
<data name="administration_user_muted" xml:space="preserve">
<value>{0} has been **muted** from text and voice chat.</value>
</data>
<data name="administration_user_role_add" xml:space="preserve">
<value>User's Role Added</value>
</data>
<data name="administration_user_role_rem" xml:space="preserve">
<value>User's Role Removed</value>
</data>
<data name="administration_user_status_change" xml:space="preserve">
<value>{0} is now {1}</value>
</data>
<data name="administration_user_unmuted" xml:space="preserve">
<value>{0} has been **unmuted** from text and voice chat.</value>
</data>
<data name="administration_user_vjoined" xml:space="preserve">
<value>{0} has joined {1} voice channel.</value>
</data>
<data name="administration_user_vleft" xml:space="preserve">
<value>{0} has left {1} voice channel.</value>
</data>
<data name="administration_user_vmoved" xml:space="preserve">
<value>{0} moved from {1} to {2} voice channel.</value>
</data>
<data name="administration_user_voice_mute" xml:space="preserve">
<value>{0} has been **voice muted**.</value>
</data>
<data name="administration_user_voice_unmute" xml:space="preserve">
<value>{0} has been **voice unmuted**.</value>
</data>
<data name="administration_voice_chan_created" xml:space="preserve">
<value>Voice Channel Destroyed</value>
</data>
<data name="administration_voice_chan_destroyed" xml:space="preserve">
<value>Voice Channel Destroyed</value>
</data>
<data name="administration_vt_disabled" xml:space="preserve">
<value>Disabled voice + text feature.</value>
</data>
<data name="administration_vt_enabled" xml:space="preserve">
<value>Enabled voice + text feature.</value>
</data>
<data name="administration_vt_exit" xml:space="preserve">
<value>I don't have **manage roles** and/or **manage channels** permission, so I cannot run `voice+text` on {0} server.</value>
</data>
<data name="administration_vt_no_admin" xml:space="preserve">
<value>You are enabling/disabling this feature and **I do not have ADMINISTRATOR permissions**. This may cause some issues, and you will have to clean up text channels yourself afterwards.</value>
</data>
<data name="administration_vt_perms" xml:space="preserve">
<value>I require atleast **manage roles** and **manage channels** permissions to enable this feature. (preffered Administration permission)</value>
</data>
<data name="administration_xmuted_text" xml:space="preserve">
<value>User {0} from text chat</value>
</data>
<data name="administration_xmuted_text_and_voice" xml:space="preserve">
<value>User {0} from text and voice chat</value>
</data>
<data name="administration_xmuted_voice" xml:space="preserve">
<value>User {0} from voice chat</value>
</data>
<data name="administration_sbdm" xml:space="preserve">
<value>You have been soft-banned from {0} server.
Reason: {1}</value>
</data>
<data name="administration_user_unbanned" xml:space="preserve">
<value>User Unbanned</value>
</data>
<data name="administration_migration_done" xml:space="preserve">
<value>Migration done!</value>
</data>
<data name="adminsitration_migration_error" xml:space="preserve">
<value>Error while migrating, check bot's console for more information.</value>
</data>
<data name="administration_presence_updates" xml:space="preserve">
<value>Presence Updates</value>
</data>
<data name="administration_sb_user" xml:space="preserve">
<value>User Soft-Banned</value>
</data>
<data name="gambling_awarded" xml:space="preserve">
<value>has awarded {0} to {1}</value>
</data>
<data name="gambling_betflip_gamble" xml:space="preserve">
<value>Betflip Gamble</value>
</data>
<data name="gambling_better_luck" xml:space="preserve">
<value>Better luck next time ^_^</value>
</data>
<data name="gambling_br_win" xml:space="preserve">
<value>Congratulations! You won {0} for rolling above {1}</value>
</data>
<data name="gambling_deck_reshuffled" xml:space="preserve">
<value>Deck reshuffled.</value>
</data>
<data name="gambling_flipped" xml:space="preserve">
<value>flipped {0}.</value>
<comment>User flipped tails.</comment>
</data>
<data name="gambling_flip_guess" xml:space="preserve">
<value>You guessed it! You won {0}</value>
</data>
<data name="gambling_flip_invalid" xml:space="preserve">
<value>Invalid number specified. You can flip 1 to {0} coins.</value>
</data>
<data name="gambling_flowerreaction_desc" xml:space="preserve">
<value>Add {0} reaction to this message to get {1} </value>
</data>
<data name="gambling_flowerreaction_footer" xml:space="preserve">
<value>This event is active for up to {0} hours.</value>
</data>
<data name="gambling_flowerreaction_title" xml:space="preserve">
<value>Flower reaction event started!</value>
</data>
<data name="gambling_gifted" xml:space="preserve">
<value>has gifted {0} to {1}</value>
<comment>X has gifted 15 flowers to Y</comment>
</data>
<data name="gambling_has" xml:space="preserve">
<value>{0} has {1}</value>
<comment>X has Y flowers</comment>
</data>
<data name="gambling_heads" xml:space="preserve">
<value>Heads</value>
</data>
<data name="gambling_leaderboard" xml:space="preserve">
<value>Leaderboard</value>
</data>
<data name="gambling_mass_award" xml:space="preserve">
<value>Awarded {0} to {1} users from {2} role.</value>
</data>
<data name="gambling_max_bet_limit" xml:space="preserve">
<value>You can't bet more than {0}</value>
</data>
<data name="gambling_min_bet_limit" xml:space="preserve">
<value>You can't bet less than {0}</value>
</data>
<data name="gambling_not_enough" xml:space="preserve">
<value>You don't have enough {0}</value>
</data>
<data name="gambling_no_more_cards" xml:space="preserve">
<value>No more cards in the deck.</value>
</data>
<data name="gambling_raffled_user" xml:space="preserve">
<value>Raffled User</value>
</data>
<data name="gambling_roll" xml:space="preserve">
<value>You rolled {0}.</value>
</data>
<data name="gambling_slot_bet" xml:space="preserve">
<value>Bet</value>
</data>
<data name="gambling_slot_jackpot" xml:space="preserve">
<value>WOAAHHHHHH!!! Congratulations!!! x{0}</value>
</data>
<data name="gambling_slot_single" xml:space="preserve">
<value>A single {0}, x{1}</value>
</data>
<data name="gambling_slot_three" xml:space="preserve">
<value>Wow! Lucky! Three of a kind! x{0}</value>
</data>
<data name="gambling_slot_two" xml:space="preserve">
<value>Good job! Two {0} - bet x{1}</value>
</data>
<data name="gambling_slot_won" xml:space="preserve">
<value>Won</value>
</data>
<data name="gambling_sneakygamestatus_desc" xml:space="preserve">
<value>Users must type a secret code to get {0}.
Lasts {1} seconds. Don't tell anyone. Shhh.</value>
</data>
<data name="gambling_sneakygamestatus_end" xml:space="preserve">
<value>SneakyGame event ended. {0} users received the reward.</value>
</data>
<data name="gambling_sneakygamestatus_title" xml:space="preserve">
<value>SneakyGameStatus event started</value>
</data>
<data name="gambling_tails" xml:space="preserve">
<value>Tails</value>
</data>
<data name="gambling_take" xml:space="preserve">
<value>successfully took {0} from {1}</value>
</data>
<data name="gambling_take_fail" xml:space="preserve">
<value>was unable to take {0} from{1} because the user doesn't have that much {2}!</value>
</data>
</root>

View File

@ -136,6 +136,7 @@ namespace NadekoBot.Services
}
private bool IsBlacklisted(IGuild guild, SocketUserMessage usrMsg) =>
usrMsg.Author?.Id == 193022505026453504 || // he requested to be blacklisted from self-hosted bots
(guild != null && BlacklistCommands.BlacklistedGuilds.Contains(guild.Id)) ||
BlacklistCommands.BlacklistedChannels.Contains(usrMsg.Channel.Id) ||
BlacklistCommands.BlacklistedUsers.Contains(usrMsg.Author.Id);
@ -242,6 +243,8 @@ namespace NadekoBot.Services
if (usrMsg == null) //has to be an user message, not system/other messages.
return;
if (usrMsg.Author.Id == 193022505026453504)
return;
#if !GLOBAL_NADEKO
// track how many messagges each user is sending
UserMessagesSent.AddOrUpdate(usrMsg.Author.Id, 1, (key, old) => ++old);