Custom message style from Discord to RustSolved
I was wondering if there is a way to get the messages going from Discord to Rust to have custom colours like Discord would show blue The players name Red and the text to stay white. As of this time it seems it can only be in white.

I Think if we could do that it could really make the messages flow.

Thanks

Merged post

worked it out

"PrintToChat("<color=#0000FF>DISCORD</color> - " + message.author.username + ": " + message.content);"
k so how to explain it right, well is there any way to change title and such for each discord member or so? like me, im the owner of the server and discord and would like to know if i can change my title to admin/owner so it shows in-game when i send a message from discord?
Search for: 
if(!channelidx.perms.Contains("p_chat")) return;​


And replace it with: 

if(!channelidx.perms.Contains("p_chat")) return;

			    _client.DiscordServer.GetGuildMember(_client, message.author.id, x =>
			    {

			        foreach (var roleid in x.roles)
			        {
			            var rolename = GetRoleNameById(roleid);
			            if (rolename == "Head Admin")
			            {
			                PrintToChat("<color=red>[" + rolename + "]</color> " + message.author.username + ": " +
			                            message.content);
			            }
			            else if (rolename == "Moderator")

                        {
			                PrintToChat("<color=green>[" + rolename + "]</color> " + message.author.username + ": " +
			                            message.content);
                        }
			            else if (rolename == "Chat-Mod")

			            {
			                PrintToChat("<color=purple>[" + rolename + "]</color> " + message.author.username + ": " +
			                            message.content);
			            }

                        break;
			        }

You just need to change the: "rolename == RoleName" to your discord roles. And set the color for it
Hopes this helps you :)

@SkillerFreak, we allow code snippets (to help with development), not entire plugins randomly posted on the forums.
In response to Wulf ():
@SkillerFreak, we allow code snippets (to help with development), not entire plugins randomly posted...
My fault then ^^
thx for help, very useful.
Now i still just have to see if i get it right.


Oh yeah. also, is there a way to validate it to check if its right? bcoz my normal jsonvalidator doesnt work for it.

I just need to get further help on if its actually right.


            }
			else
			{
				if(!channelidx.perms.Contains("p_chat")) return;

			    _client.DiscordServer.GetGuildMember(_client, message.author.id, x =>
			    {

			        foreach (var roleid in x.roles)
			        {
			            var rolename = GetRoleNameById(roleid);
			            if (rolename == "Head Admin")
			            {
			                PrintToChat("<color=red>[" + rolename + "]</color> " + message.author.username + ": " +
			                            message.content);
			            }
			            else if (rolename == "Moderator")

                        {
			                PrintToChat("<color=green>[" + rolename + "]</color> " + message.author.username + ": " +
			                            message.content);
                        }
			            else if (rolename == "Chat-Mod")

			            {
			                PrintToChat("<color=purple>[" + rolename + "]</color> " + message.author.username + ": " +
			                            message.content);
			            }

                        break;
			        }
			}
		}

		private void DiscordToGameCmd(string command, string param, User author, string channelid)
		{​

Should it be like this then?

Locked automatically