mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
Updated lib, fixed icon_url in .showembed
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
#nullable disable
|
#nullable disable
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace NadekoBot;
|
namespace NadekoBot;
|
||||||
|
|
||||||
@@ -8,6 +9,7 @@ public class SmartTextEmbedAuthor
|
|||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
[JsonProperty("icon_url")]
|
[JsonProperty("icon_url")]
|
||||||
|
[JsonPropertyName("icon_url")]
|
||||||
public string IconUrl { get; set; }
|
public string IconUrl { get; set; }
|
||||||
|
|
||||||
public string Url { get; set; }
|
public string Url { get; set; }
|
||||||
|
@@ -1,5 +1,6 @@
|
|||||||
#nullable disable
|
#nullable disable
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace NadekoBot;
|
namespace NadekoBot;
|
||||||
|
|
||||||
@@ -8,5 +9,6 @@ public class SmartTextEmbedFooter
|
|||||||
public string Text { get; set; }
|
public string Text { get; set; }
|
||||||
|
|
||||||
[JsonProperty("icon_url")]
|
[JsonProperty("icon_url")]
|
||||||
|
[JsonPropertyName("icon_url")]
|
||||||
public string IconUrl { get; set; }
|
public string IconUrl { get; set; }
|
||||||
}
|
}
|
@@ -5,7 +5,7 @@ namespace NadekoBot.Modules.Administration;
|
|||||||
public sealed class DoAsUserMessage : IUserMessage
|
public sealed class DoAsUserMessage : IUserMessage
|
||||||
{
|
{
|
||||||
private readonly string _message;
|
private readonly string _message;
|
||||||
private IUserMessage _msg;
|
private readonly IUserMessage _msg;
|
||||||
private readonly IUser _user;
|
private readonly IUser _user;
|
||||||
|
|
||||||
public DoAsUserMessage(SocketUserMessage msg, IUser user, string message)
|
public DoAsUserMessage(SocketUserMessage msg, IUser user, string message)
|
||||||
@@ -49,6 +49,13 @@ public sealed class DoAsUserMessage : IUserMessage
|
|||||||
return _msg.RemoveAllReactionsForEmoteAsync(emote, options);
|
return _msg.RemoveAllReactionsForEmoteAsync(emote, options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public IAsyncEnumerable<IReadOnlyCollection<IUser>> GetReactionUsersAsync(
|
||||||
|
IEmote emoji,
|
||||||
|
int limit,
|
||||||
|
RequestOptions? options = null,
|
||||||
|
ReactionType type = ReactionType.Normal)
|
||||||
|
=> _msg.GetReactionUsersAsync(emoji, limit, options, type);
|
||||||
|
|
||||||
public IAsyncEnumerable<IReadOnlyCollection<IUser>> GetReactionUsersAsync(IEmote emoji, int limit,
|
public IAsyncEnumerable<IReadOnlyCollection<IUser>> GetReactionUsersAsync(IEmote emoji, int limit,
|
||||||
RequestOptions? options = null)
|
RequestOptions? options = null)
|
||||||
{
|
{
|
||||||
@@ -78,6 +85,7 @@ public sealed class DoAsUserMessage : IUserMessage
|
|||||||
public IMessageChannel Channel => _msg.Channel;
|
public IMessageChannel Channel => _msg.Channel;
|
||||||
|
|
||||||
public IUser Author => _user;
|
public IUser Author => _user;
|
||||||
|
public IThreadChannel Thread => _msg.Thread;
|
||||||
|
|
||||||
public IReadOnlyCollection<IAttachment> Attachments => _msg.Attachments;
|
public IReadOnlyCollection<IAttachment> Attachments => _msg.Attachments;
|
||||||
|
|
||||||
@@ -106,6 +114,7 @@ public sealed class DoAsUserMessage : IUserMessage
|
|||||||
public MessageFlags? Flags => _msg.Flags;
|
public MessageFlags? Flags => _msg.Flags;
|
||||||
|
|
||||||
public IMessageInteraction Interaction => _msg.Interaction;
|
public IMessageInteraction Interaction => _msg.Interaction;
|
||||||
|
public MessageRoleSubscriptionData RoleSubscriptionData => _msg.RoleSubscriptionData;
|
||||||
|
|
||||||
public Task ModifyAsync(Action<MessageProperties> func, RequestOptions? options = null)
|
public Task ModifyAsync(Action<MessageProperties> func, RequestOptions? options = null)
|
||||||
{
|
{
|
||||||
@@ -134,5 +143,7 @@ public sealed class DoAsUserMessage : IUserMessage
|
|||||||
return _msg.Resolve(userHandling, channelHandling, roleHandling, everyoneHandling, emojiHandling);
|
return _msg.Resolve(userHandling, channelHandling, roleHandling, everyoneHandling, emojiHandling);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public MessageResolvedData ResolvedData => _msg.ResolvedData;
|
||||||
|
|
||||||
public IUserMessage ReferencedMessage => _msg.ReferencedMessage;
|
public IUserMessage ReferencedMessage => _msg.ReferencedMessage;
|
||||||
}
|
}
|
@@ -464,12 +464,14 @@ public partial class Utility : NadekoModule
|
|||||||
{
|
{
|
||||||
if (tags.Length == 0)
|
if (tags.Length == 0)
|
||||||
tags = new[] { name };
|
tags = new[] { name };
|
||||||
|
|
||||||
await ctx.Guild.CreateStickerAsync(name,
|
await ctx.Guild.CreateStickerAsync(
|
||||||
string.IsNullOrWhiteSpace(description) ? "Missing description" : description,
|
name,
|
||||||
tags,
|
|
||||||
stream,
|
stream,
|
||||||
$"{name}.{format}");
|
$"{name}.{format}",
|
||||||
|
tags,
|
||||||
|
string.IsNullOrWhiteSpace(description) ? "Missing description" : description
|
||||||
|
);
|
||||||
|
|
||||||
await ctx.OkAsync();
|
await ctx.OkAsync();
|
||||||
}
|
}
|
||||||
|
@@ -27,7 +27,7 @@
|
|||||||
<PackageReference Include="CodeHollow.FeedReader" Version="1.2.4" />
|
<PackageReference Include="CodeHollow.FeedReader" Version="1.2.4" />
|
||||||
<PackageReference Include="CommandLineParser" Version="2.9.1" />
|
<PackageReference Include="CommandLineParser" Version="2.9.1" />
|
||||||
<PackageReference Include="CsvHelper" Version="28.0.1" />
|
<PackageReference Include="CsvHelper" Version="28.0.1" />
|
||||||
<PackageReference Include="Discord.Net" Version="3.104.0" />
|
<PackageReference Include="Discord.Net" Version="3.203.0" />
|
||||||
<PackageReference Include="CoreCLR-NCalc" Version="2.2.110" />
|
<PackageReference Include="CoreCLR-NCalc" Version="2.2.110" />
|
||||||
<PackageReference Include="Google.Apis.Urlshortener.v1" Version="1.41.1.138" />
|
<PackageReference Include="Google.Apis.Urlshortener.v1" Version="1.41.1.138" />
|
||||||
<PackageReference Include="Google.Apis.YouTube.v3" Version="1.62.1.3205" />
|
<PackageReference Include="Google.Apis.YouTube.v3" Version="1.62.1.3205" />
|
||||||
|
Reference in New Issue
Block a user