mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-10 17:28:27 -04:00
Merge branch 'v4' into v5
This commit is contained in:
@@ -78,14 +78,14 @@ public partial class Gambling
|
|||||||
{
|
{
|
||||||
if (await _bank.TakeAsync(userId, amount))
|
if (await _bank.TakeAsync(userId, amount))
|
||||||
{
|
{
|
||||||
await ReplyErrorLocalizedAsync(strs.take_fail(N(amount),
|
await ctx.OkAsync();
|
||||||
_client.GetUser(userId)?.ToString()
|
|
||||||
?? userId.ToString(),
|
|
||||||
CurrencySign));
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
await ctx.OkAsync();
|
await ReplyErrorLocalizedAsync(strs.take_fail(N(amount),
|
||||||
|
_client.GetUser(userId)?.ToString()
|
||||||
|
?? userId.ToString(),
|
||||||
|
CurrencySign));
|
||||||
}
|
}
|
||||||
|
|
||||||
private async Task BankAwardInternalAsync(long amount, ulong userId)
|
private async Task BankAwardInternalAsync(long amount, ulong userId)
|
||||||
|
@@ -19,6 +19,7 @@ public class MuteService : INService
|
|||||||
|
|
||||||
private static readonly OverwritePermissions _denyOverwrite = new(addReactions: PermValue.Deny,
|
private static readonly OverwritePermissions _denyOverwrite = new(addReactions: PermValue.Deny,
|
||||||
sendMessages: PermValue.Deny,
|
sendMessages: PermValue.Deny,
|
||||||
|
sendMessagesInThreads: PermValue.Deny,
|
||||||
attachFiles: PermValue.Deny);
|
attachFiles: PermValue.Deny);
|
||||||
|
|
||||||
public event Action<IGuildUser, IUser, MuteType, string> UserMuted = delegate { };
|
public event Action<IGuildUser, IUser, MuteType, string> UserMuted = delegate { };
|
||||||
|
@@ -296,8 +296,8 @@ public class SearchesService : INService
|
|||||||
public async Task<string> GetChuckNorrisJoke()
|
public async Task<string> GetChuckNorrisJoke()
|
||||||
{
|
{
|
||||||
using var http = _httpFactory.CreateClient();
|
using var http = _httpFactory.CreateClient();
|
||||||
var response = await http.GetStringAsync(new Uri("http://api.icndb.com/jokes/random/"));
|
var response = await http.GetStringAsync(new Uri("https://api.chucknorris.io/jokes/random"));
|
||||||
return JObject.Parse(response)["value"]["joke"] + " 😆";
|
return JObject.Parse(response)["value"] + " 😆";
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<MtgData> GetMtgCardAsync(string search)
|
public async Task<MtgData> GetMtgCardAsync(string search)
|
||||||
|
Reference in New Issue
Block a user