mirror of
https://github.com/Jetsparrow/karmabot.git
synced 2026-01-21 00:56:09 +03:00
Switch awardtypeid to int + fix /at help
This commit is contained in:
parent
b0632cf3b7
commit
3942b17c64
@ -91,7 +91,7 @@ namespace JetKarmaBot.Commands
|
||||
|
||||
var text = args.Message.Text;
|
||||
string awardTypeAcc, awardTypeSym;
|
||||
sbyte? awardTypeId;
|
||||
int? awardTypeId;
|
||||
if (awardTypeText == null || awardTypeText == "star")
|
||||
{
|
||||
awardTypeAcc = currentLocale["jetkarmabot.star.accusative"];
|
||||
|
||||
@ -30,7 +30,7 @@ namespace JetKarmaBot.Commands
|
||||
VerbRouter.Add(C.GetInstance<AwardTypeManage.CreateCommand>());
|
||||
VerbRouter.Add(C.GetInstance<AwardTypeManage.RemoveCommand>());
|
||||
VerbRouter.Add(C.GetInstance<AwardTypeManage.SetParameterCommand>());
|
||||
VerbRouter.Add(C.GetInstance<HelpCommand>());
|
||||
VerbRouter.Add(C.ResolveObject(new HelpCommand()));
|
||||
}
|
||||
|
||||
public IReadOnlyCollection<ChatCommandArgument> Arguments => new[] {
|
||||
|
||||
@ -28,7 +28,7 @@ namespace JetKarmaBot.Commands
|
||||
string response;
|
||||
|
||||
string awardTypeSym;
|
||||
sbyte? awardTypeId;
|
||||
int? awardTypeId;
|
||||
if (string.IsNullOrWhiteSpace(awardTypeName) || awardTypeName == "star")
|
||||
{
|
||||
awardTypeId = null;
|
||||
|
||||
@ -54,7 +54,7 @@ namespace JetKarmaBot.Commands
|
||||
}
|
||||
else
|
||||
{
|
||||
sbyte? awardTypeId;
|
||||
int? awardTypeId;
|
||||
string awardTypeSym;
|
||||
if (awardTypeName == "star")
|
||||
{
|
||||
|
||||
@ -10,7 +10,7 @@ namespace JetKarmaBot.Models
|
||||
public long ChatId { get; set; }
|
||||
public int FromId { get; set; }
|
||||
public int ToId { get; set; }
|
||||
public sbyte? AwardTypeId { get; set; }
|
||||
public int? AwardTypeId { get; set; }
|
||||
public sbyte Amount { get; set; }
|
||||
public DateTime Date { get; set; }
|
||||
[ForeignKey("AwardTypeId")]
|
||||
|
||||
@ -11,7 +11,7 @@ namespace JetKarmaBot.Models
|
||||
Awards = new HashSet<Award>();
|
||||
}
|
||||
|
||||
public sbyte AwardTypeId { get; set; }
|
||||
public int AwardTypeId { get; set; }
|
||||
public string CommandName { get; set; }
|
||||
public long ChatId { get; set; }
|
||||
public string NominativeName { get; set; }
|
||||
|
||||
@ -60,7 +60,7 @@ namespace JetKarmaBot.Models
|
||||
|
||||
entity.Property(e => e.AwardTypeId)
|
||||
.HasColumnName("awardtypeid")
|
||||
.HasColumnType("tinyint(3)");
|
||||
.HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.ChatId)
|
||||
.HasColumnName("chatid")
|
||||
@ -118,7 +118,7 @@ namespace JetKarmaBot.Models
|
||||
|
||||
entity.Property(e => e.AwardTypeId)
|
||||
.HasColumnName("awardtypeid")
|
||||
.HasColumnType("tinyint(3)");
|
||||
.HasColumnType("int(11)");
|
||||
|
||||
entity.Property(e => e.CommandName)
|
||||
.IsRequired()
|
||||
|
||||
Loading…
Reference in New Issue
Block a user