adds support to not add the chatter name in discord replys
This commit is contained in:
parent
74f0ef29a8
commit
839d992479
3 changed files with 26 additions and 6 deletions
|
|
@ -52,6 +52,7 @@ ENV basic_Username='' \
|
||||||
discord_ServerID='' \
|
discord_ServerID='' \
|
||||||
discord_ClientToken='' \
|
discord_ClientToken='' \
|
||||||
discord_AllowDiscordCommands='false' \
|
discord_AllowDiscordCommands='false' \
|
||||||
|
discord_hideChatterName='false' \
|
||||||
events_Enabled='false' \
|
events_Enabled='false' \
|
||||||
events_GroupMemberJoins='false' \
|
events_GroupMemberJoins='false' \
|
||||||
events_GroupMemberLeaves='false' \
|
events_GroupMemberLeaves='false' \
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ namespace SecondBotEvents.Config
|
||||||
settings.Add("InteractionCommandName");
|
settings.Add("InteractionCommandName");
|
||||||
settings.Add("InteractionHttpTarget");
|
settings.Add("InteractionHttpTarget");
|
||||||
settings.Add("InteractionChannelNumber");
|
settings.Add("InteractionChannelNumber");
|
||||||
|
settings.Add("hideChatterName");
|
||||||
settings.Add("HideStatusOutput");
|
settings.Add("HideStatusOutput");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -26,6 +27,11 @@ namespace SecondBotEvents.Config
|
||||||
return ReadSettingAsBool("Enabled");
|
return ReadSettingAsBool("Enabled");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public bool GethideChatterName()
|
||||||
|
{
|
||||||
|
return ReadSettingAsBool("hideChatterName", false);
|
||||||
|
}
|
||||||
|
|
||||||
public ulong GetServerID()
|
public ulong GetServerID()
|
||||||
{
|
{
|
||||||
return ReadSettingAsUlong("ServerID", 0);
|
return ReadSettingAsUlong("ServerID", 0);
|
||||||
|
|
|
||||||
|
|
@ -363,7 +363,14 @@ namespace SecondBotEvents.Services
|
||||||
"discordapi", "GroupBan", null, args.ToArray(), 0, "none", false, 0, "", false), message);
|
"discordapi", "GroupBan", null, args.ToArray(), 0, "none", false, 0, "", false), message);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (myConfig.GethideChatterName() == false)
|
||||||
|
{
|
||||||
GetClient().Self.InstantMessageGroup(groupuuid, message.Author.Username + ": " + message.CleanContent);
|
GetClient().Self.InstantMessageGroup(groupuuid, message.Author.Username + ": " + message.CleanContent);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GetClient().Self.InstantMessageGroup(groupuuid, message.CleanContent);
|
||||||
|
}
|
||||||
_ = message.DeleteAsync();
|
_ = message.DeleteAsync();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -442,8 +449,15 @@ namespace SecondBotEvents.Services
|
||||||
GetClient().Self.SendTeleportLure(avataruuid);
|
GetClient().Self.SendTeleportLure(avataruuid);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (myConfig.GethideChatterName() == false)
|
||||||
|
{
|
||||||
master.DataStoreService.GetAvatarName(avataruuid); // add avatar to lookup service just in case.
|
master.DataStoreService.GetAvatarName(avataruuid); // add avatar to lookup service just in case.
|
||||||
GetClient().Self.InstantMessage(avataruuid, message.Author.Username + ": " + message.CleanContent);
|
GetClient().Self.InstantMessage(avataruuid, message.Author.Username + ": " + message.CleanContent);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
GetClient().Self.InstantMessage(avataruuid, message.CleanContent);
|
||||||
|
}
|
||||||
_ = MarkMessage((IUserMessage)message, "✅");
|
_ = MarkMessage((IUserMessage)message, "✅");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1035,7 +1049,6 @@ namespace SecondBotEvents.Services
|
||||||
{
|
{
|
||||||
LoginEventsAttached = true;
|
LoginEventsAttached = true;
|
||||||
GetClient().Self.IM += BotImMessage;
|
GetClient().Self.IM += BotImMessage;
|
||||||
GetClient().Network.SimConnected -= BotCurrentSim;
|
|
||||||
GetClient().Self.ChatFromSimulator += LocalChat;
|
GetClient().Self.ChatFromSimulator += LocalChat;
|
||||||
GetClient().Groups.CurrentGroups += GroupCurrent;
|
GetClient().Groups.CurrentGroups += GroupCurrent;
|
||||||
GetClient().Groups.RequestCurrentGroups();
|
GetClient().Groups.RequestCurrentGroups();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue