mirror of
https://github.com/SamueleLorefice/isleBot.git
synced 2026-01-15 06:03:42 +00:00
Implemented database basic functions, added ToFormattedString to Card class, improved commands sending to the guild manager on discord, added toString to user class
This commit is contained in:
16
User.cs
16
User.cs
@@ -4,16 +4,28 @@ namespace IsleBot;
|
||||
|
||||
public class User {
|
||||
[DataMember(IsRequired = true)]
|
||||
public int Id { get; private set; }
|
||||
public ulong Id { get; private set; }
|
||||
public string UserName { get; set; }
|
||||
|
||||
public List<Card> Cards { get; set; }
|
||||
|
||||
//public List<Match> Matches { get; set; }
|
||||
|
||||
public User(int id, string userName) {
|
||||
public User(ulong id, string userName) {
|
||||
Id = id;
|
||||
UserName = userName;
|
||||
Cards = new List<Card>();
|
||||
}
|
||||
|
||||
public override string ToString() {
|
||||
var profileStr = $"**{UserName}**\n"+
|
||||
$"**Total Cards:** {Cards.Count}\n" +
|
||||
$"\n";
|
||||
|
||||
foreach (var card in Cards.Take(5)) {
|
||||
profileStr += card.ToFormattedString() + "\n";
|
||||
}
|
||||
|
||||
return profileStr;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user