Skip to content

Commit

Permalink
Use embed UI
Browse files Browse the repository at this point in the history
  • Loading branch information
Kingsman0530 committed Feb 21, 2024
1 parent 6fb6db7 commit 8d890f4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
16 changes: 14 additions & 2 deletions Bot/Dc/Cmds.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
using ClashOfClans.Models;
using Discord;
using Discord.Interactions;
using Discord.WebSocket;
using Hyperstellar.Dc.Attr;
Expand Down Expand Up @@ -69,10 +70,21 @@ public async Task AltAsync(Member alt, Member main)
await RespondAsync($"`{clanAlt.Name}` is an alt of `{clanMain.Name}`");
}

[SlashCommand("info", "Check the User's infomation")]
[SlashCommand("info", "Print the member's infomation")]
public async Task InfoAsync(Member member)
{
ClanMember cocMem = Coc.GetMember(member.CocId);
await RespondAsync($"{cocMem.Tag} {cocMem.Name}");

var embed = new EmbedBuilder
{
Title = cocMem.Name,
Author = new EmbedAuthorBuilder
{
Name = cocMem.Tag,
},

};

await RespondAsync(embed: embed.Build());
}
}
2 changes: 1 addition & 1 deletion Bot/Sql/Donation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace Hyperstellar.Sql;
internal sealed class Donation(string id)
{
[PrimaryKey, NotNull]
public string Id { get; set; } = id;
public string MainId { get; set; } = id;

[NotNull]
public uint Donated { get; set; } = 0;
Expand Down

0 comments on commit 8d890f4

Please sign in to comment.