View Single Post
sneaK
SourceMod Moderator
Join Date: Feb 2015
Location: USA
Old 03-05-2018 , 03:32   Re: [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
Reply With Quote #92

Quote:
Originally Posted by ThisIsAUsername View Post
Could you perhaps give us an example Thanks in advance!
Sure thing.

Insert to the attachments section properly (towards the end, proper syntax and formatting is very important):
Code:
\"ts\": \"{TIMESTAMP}\"}]}
and the magic:

Code:
int gettime = GetTime(); char szTimestamp[64]; IntToString(gettime, szTimestamp, sizeof(szTimestamp)); ReplaceString(msg, sizeof(msg), "{TIMESTAMP}", szTimestamp);

If you look at the discord_sourcebans plugin you'll see where to put all of these.
__________________

Last edited by sneaK; 03-05-2018 at 03:33.
sneaK is offline