修复id长度
This commit is contained in:
parent
9f55aaca48
commit
b37bac6209
@ -536,11 +536,14 @@ namespace Milimoe.RainBOT.ListeningTask
|
||||
Bot.ColorfulCheckPass(sender, "随机叫哥", dice, GeneralSettings.PCallBrother, delay);
|
||||
string name = (sender.card != "" ? sender.card : sender.nickname).Trim();
|
||||
int pos = new Random().Next(name.Length - 1);
|
||||
GroupMessageContent content = new(e.group_id);
|
||||
content.message.Add(new AtMessage(e.user_id));
|
||||
content.message.Add(new TextMessage(string.Concat(name.AsSpan(pos, 2), "哥")));
|
||||
_ = Bot.SendGroupMessage(e.group_id, "随机叫哥", content, delay * 1000);
|
||||
return;
|
||||
if (pos != -1)
|
||||
{
|
||||
GroupMessageContent content = new(e.group_id);
|
||||
content.message.Add(new AtMessage(e.user_id));
|
||||
content.message.Add(new TextMessage(string.Concat(name.AsSpan(pos, name.Length > 1 ? 2 : name.Length), "哥")));
|
||||
_ = Bot.SendGroupMessage(e.group_id, "随机叫哥", content, delay * 1000);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@ -53,6 +53,7 @@
|
||||
MusicList.Add("igs", "file:///" + AppDomain.CurrentDomain.BaseDirectory.ToString() + @"music\igotsmoke.mp3");
|
||||
MusicList.Add("劝导", "file:///" + AppDomain.CurrentDomain.BaseDirectory.ToString() + @"music\丁真劝导.mp3");
|
||||
MusicList.Add("丁真", "file:///" + AppDomain.CurrentDomain.BaseDirectory.ToString() + @"music\丁真劝导.mp3");
|
||||
MusicList.Add("change", "file:///" + AppDomain.CurrentDomain.BaseDirectory.ToString() + @"music\change.mp3");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -3,8 +3,8 @@
|
||||
public class OSMCore
|
||||
{
|
||||
public const string version = "v1.0";
|
||||
public const string version2 = "Patch2 Test";
|
||||
public const string time = "Mar. 25th, 2024";
|
||||
public const string version2 = "Patch2 Test2";
|
||||
public const string time = "Apr. 1st, 2024";
|
||||
|
||||
public static string Info => $"OSM Core {version} {version2}\r\nAuthor: Milimoe\r\nBuilt on {time}\r\nSee: https://github.com/milimoe";
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user