Raised This Month: $12 Target: $400
 3% 

[ANY] Discord/Slack API (CallAdmin, SourceBans, ...)


Post New Thread Reply   
 
Thread Tools Display Modes
ThisIsAUsername
Junior Member
Join Date: Nov 2017
Old 03-04-2018 , 21:59   Re: [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
Reply With Quote #91

Quote:
Originally Posted by sneaK View Post
Welp, solved my own question, in case anyone is looking to do the same thing.

Use slack formatting, as shown here: https://birdie0.github.io/discord-we...ormatting.html

(use "ts" and GetTime())
Could you perhaps give us an example Thanks in advance!
ThisIsAUsername is offline
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
ThisIsAUsername
Junior Member
Join Date: Nov 2017
Old 03-05-2018 , 23:20   Re: [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
Reply With Quote #93

Quote:
Originally Posted by sneaK View Post
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);
Thanks alot, got it working!
ThisIsAUsername is offline
A_RM
AlliedModders Donor
Join Date: Oct 2016
Location: Canada
Old 03-06-2018 , 19:36   Re: [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
Reply With Quote #94

Awesome plugin zipcore, thank you so much! Use of webhooks is great
A_RM is offline
Werewolf_UK
AlliedModders Donor
Join Date: Oct 2010
Location: United Kingdom
Old 03-10-2018 , 14:47   Re: [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
Reply With Quote #95

Re-posting this because I'd like an answer if possible:
Quote:
Originally Posted by Werewolf_UK View Post
OK I have got it working now, but now it does not pass messages onto the actual !call bot.

Ideally I'd like to use both the Steam bot and this, but it seems to be an either/or affair. Is there some way to have both working?
Just to make this clear, if I use THIS plugin to have the reports posted in my Discord server, the same report isn't sent via the actual !calladmin plugin.
__________________
Werewolf_UK is offline
Sw00p
Member
Join Date: Nov 2013
Location: Sweden
Old 03-10-2018 , 17:35   Re: [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
Reply With Quote #96

Im getting this error:

[discord.smx] [OnRequestComplete] Error Code: [401]

What can I've done wrong?
__________________
Sw00p is offline
Send a message via Skype™ to Sw00p
GnomeChompski
Senior Member
Join Date: Jul 2012
Old 03-29-2018 , 17:01   Re: [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
Reply With Quote #97

On doing sm_testdiscord it gives me "Error: Webhook: https - Url:" and nothing comes up in discord.

Edit: when doing "sm_testdiscord test_discord memes" it spammed the console out with

L 03/29/2018 - 21:14:43: [discord.smx] SendNextMsg: Failed To Send Message
__________________

Last edited by GnomeChompski; 03-29-2018 at 17:14.
GnomeChompski is offline
daleGEND
AlliedModders Donor
Join Date: Feb 2005
Location: USA
Old 03-29-2018 , 21:42   Re: [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
Reply With Quote #98

Is it possible to have this give status updates of the server the plugin is on? So basically it shoots a message to whatever channel you want that says how many players are currently on that server after X amount of time.
__________________
Bor3d Gaming - A Mature Online Gaming Community

Feel free to add me on STEAM as well: https://steamcommunity.com/id/b0r3d
daleGEND is offline
Gumiland
Member
Join Date: Jun 2016
Old 04-08-2018 , 13:32   Re: [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
Reply With Quote #99

Will this be updated for the recent sourcebans++ update?
__________________

Last edited by Gumiland; 04-08-2018 at 13:32.
Gumiland is offline
PGUkilljoy
Member
Join Date: Jan 2014
Location: USA
Old 04-28-2018 , 02:40   Re: [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
Reply With Quote #100

Yep - old sb++ everything was working great with discord - updated sb++ and now bans/comms no longer working with displaying it on discord - any update coming our way?
__________________
PGUkilljoy is offline
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:45.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode