mirror of
https://github.com/PluralKit/PluralKit.git
synced 2026-02-04 13:06:50 +00:00
feat: upgrade to .NET 6, refactor everything
This commit is contained in:
parent
d28e99ba43
commit
1918c56937
314 changed files with 27954 additions and 27966 deletions
|
|
@ -1,25 +1,21 @@
|
|||
using System;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
using Myriad.Types;
|
||||
|
||||
namespace PluralKit.Bot.Interactive
|
||||
{
|
||||
public class Button
|
||||
{
|
||||
public string? Label { get; set; }
|
||||
public ButtonStyle Style { get; set; } = ButtonStyle.Secondary;
|
||||
public string? CustomId { get; set; }
|
||||
public bool Disabled { get; set; }
|
||||
public Func<InteractionContext, Task> Handler { get; init; }
|
||||
namespace PluralKit.Bot.Interactive;
|
||||
|
||||
public MessageComponent ToMessageComponent() => new()
|
||||
{
|
||||
Type = ComponentType.Button,
|
||||
Label = Label,
|
||||
Style = Style,
|
||||
CustomId = CustomId,
|
||||
Disabled = Disabled
|
||||
};
|
||||
}
|
||||
public class Button
|
||||
{
|
||||
public string? Label { get; set; }
|
||||
public ButtonStyle Style { get; set; } = ButtonStyle.Secondary;
|
||||
public string? CustomId { get; set; }
|
||||
public bool Disabled { get; set; }
|
||||
public Func<InteractionContext, Task> Handler { get; init; }
|
||||
|
||||
public MessageComponent ToMessageComponent() => new()
|
||||
{
|
||||
Type = ComponentType.Button,
|
||||
Label = Label,
|
||||
Style = Style,
|
||||
CustomId = CustomId,
|
||||
Disabled = Disabled
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue