adjustments

CustomRelay_    caps on C and R
Discord relay message uses nickname
This commit is contained in:
Madpeterz 2021-02-11 18:44:01 +00:00
parent 10e935f7b7
commit 0a6d397921
3 changed files with 6 additions and 5 deletions

View file

@ -92,9 +92,9 @@ namespace BetterSecondBot.BetterRelayService
bool found = true; bool found = true;
while (found == true) while (found == true)
{ {
if (helpers.notempty(Environment.GetEnvironmentVariable("customrelay_" + loop.ToString())) == true) if (helpers.notempty(Environment.GetEnvironmentVariable("CustomRelay_" + loop.ToString())) == true)
{ {
ApplyRelayConfig(Environment.GetEnvironmentVariable("customrelay_" + loop.ToString())); ApplyRelayConfig(Environment.GetEnvironmentVariable("CustomRelay_" + loop.ToString()));
} }
else else
{ {

View file

@ -306,7 +306,8 @@ namespace BetterSecondBot.DiscordSupervisor
if (message.Author.IsBot == false) if (message.Author.IsBot == false)
{ {
ITextChannel Chan = (ITextChannel)message.Channel; ITextChannel Chan = (ITextChannel)message.Channel;
On_MessageEvent(new DiscordMessageEvent(Chan.GuildId, Chan.Id, message.Author.Username, message.Content)); IGuildUser user = await Chan.Guild.GetUserAsync(message.Author.Id).ConfigureAwait(true);
On_MessageEvent(new DiscordMessageEvent(Chan.GuildId, Chan.Id, user.Nickname, message.Content));
if (message.Content.StartsWith("!clear") == true) if (message.Content.StartsWith("!clear") == true)
{ {
await CleanDiscordChannel(Chan, 0, true).ConfigureAwait(false); await CleanDiscordChannel(Chan, 0, true).ConfigureAwait(false);

View file

@ -146,9 +146,9 @@ You get set these tokens up by file or Environment Variables.
This is to replace the old broken relay thats currently built into the bot This is to replace the old broken relay thats currently built into the bot
> customrelay_1 = "source-type:discord,source-filter:123451231235@12351312321,target-type:localchat,target-config:4" > CustomRelay_1 = "source-type:discord,source-filter:123451231235@12351312321,target-type:localchat,target-config:4"
> customrelay_2 = "source-type:discord,source-filter:123451231235@12351312321,target-type:localchat,target-config:4" > CustomRelay_2 = "source-type:discord,source-filter:123451231235@12351312321,target-type:localchat,target-config:4"
or via the config file or via the config file
customrelays customrelays