public static void UserInfo(Message msg, string[] args) { var bu = Methods.GetUser(msg, args); var status = "User without a single game"; if (bu.Gamecount > 0) { status = "Player"; } if (Admins.Contains(bu.Telegramid)) { status = "Bot Admin"; } if (Devs.ToList().Contains((int)bu.Telegramid)) { status = "Bot Developer"; } Bot.Reply( $"{bu.LinkedName}{Environment.NewLine}" + $" - @{bu.Username}{Environment.NewLine}" + $" - <code>{bu.Telegramid}</code>{Environment.NewLine}" + $" - Gamecount: <b>{bu.Gamecount}</b>{Environment.NewLine}" + $" - Achievement count: <b>{bu.Achievements.Count(x => x == '|') + 1}</b>{Environment.NewLine}" + $" - Status: {status}" , msg); }
public static void ListCommands(Message msg, string[] args) { var bu = Methods.GetUser(msg, args); var res = $"<b>User commands:</b>{Environment.NewLine}" + $"{string.Join(Environment.NewLine, Bot.Commands.Where(x => !x.AdminOnly & !x.DevOnly).Select(x => x.Trigger))}"; if (Admins.Contains(bu.Telegramid)) { res += $"{Environment.NewLine}{Environment.NewLine}<b>Bot admin commands:</b>" + $"{Environment.NewLine}{string.Join(Environment.NewLine, Bot.Commands.Where(x => x.AdminOnly).Select(x => x.Trigger))}"; } if (Devs.ToList().Contains((int)bu.Telegramid)) { res += $"{Environment.NewLine}{Environment.NewLine}<b>Bot Dev Commands:</b>" + $"{Environment.NewLine}{string.Join(Environment.NewLine, Bot.Commands.Where(x => x.DevOnly).Select(x => x.Trigger))}"; } Bot.Reply(res, msg); }