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

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


Post New Thread Reply   
 
Thread Tools Display Modes
MrDanne
Member
Join Date: Jan 2017
Location: Stockholm, Sweden
Old 01-29-2017 , 10:14   Re: [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
Reply With Quote #41

Quote:
Originally Posted by zipcore View Post
I know sm_settings. But which settings should I add there?!?
The client command like !call I was thinking about. So instead of players on the server must remember all commands, they can use 1 that connects them all, like !settings.
__________________
MrDanne is offline
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 01-29-2017 , 16:38   Re: [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
Reply With Quote #42

Quote:
Originally Posted by MrDanne View Post
The client command like !call I was thinking about. So instead of players on the server must remember all commands, they can use 1 that connects them all, like !settings.
Only one of those plugins has a command, which is an admin command (the claim command). If you were "thinking" about the calladmin command than you are on the wrong forum thread.
__________________

Last edited by zipcore; 01-29-2017 at 17:00.
zipcore is offline
DarkDeviL
SourceMod Moderator
Join Date: Apr 2012
Old 01-30-2017 , 04:44   Re: [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
Reply With Quote #43

Quote:
Originally Posted by zipcore View Post
Quote:
Originally Posted by MrDanne View Post
The client command like !call I was thinking about. So instead of players on the server must remember all commands, they can use 1 that connects them all, like !settings.
Only one of those plugins has a command, which is an admin command (the claim command). If you were "thinking" about the calladmin command than you are on the wrong forum thread.
To me, it sounds more like he is looking for some "!admin"-like command that is available to normal users, so they can simply type "!commands" or something, and then it would pop up a menu with every kind of functionality that the user has access to.
__________________
Mostly known as "DarkDeviL".

Dropbox FastDL: Public folder will no longer work after March 15, 2017!
For more info, see the [SRCDS Thread], or the [HLDS Thread].
DarkDeviL is offline
MrDanne
Member
Join Date: Jan 2017
Location: Stockholm, Sweden
Old 01-30-2017 , 09:05   Re: [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
Reply With Quote #44

Quote:
Originally Posted by zipcore View Post
Only one of those plugins has a command, which is an admin command (the claim command). If you were "thinking" about the calladmin command than you are on the wrong forum thread.
haha yes you are right!
__________________
MrDanne is offline
zipcore
Veteran Member
Join Date: Mar 2010
Location: m_flZipcore
Old 01-30-2017 , 18:30   Re: [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
Reply With Quote #45

Quote:
Originally Posted by arne1288 View Post
To me, it sounds more like he is looking for some "!admin"-like command that is available to normal users, so they can simply type "!commands" or something, and then it would pop up a menu with every kind of functionality that the user has access to.
But the plugins are not providing any non-admin commands so...
__________________

Last edited by zipcore; 01-30-2017 at 18:33.
zipcore is offline
mlov420
Senior Member
Join Date: May 2013
Old 02-05-2017 , 09:24   Re: [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
Reply With Quote #46

I installed this today on a test server. The plugin seems to work fine up until the point of the server sending the report out. The !calladmin menu works, it reads the reasons file and displays it to the user. Chat messages appear correctly. After verifying and sending the report I am receiving the following error in the server log:

Code:
L 02/05/2017 - 08:14:04: [SM] Exception reported: Cannot replace searches of empty strings
L 02/05/2017 - 08:14:04: [SM] Blaming: discord_calladmin.smx
L 02/05/2017 - 08:14:04: [SM] Call stack trace:
L 02/05/2017 - 08:14:04: [SM]   [0] ReplaceString
L 02/05/2017 - 08:14:04: [SM]   [1] Line 163, D:\Workspace\Projects\Discord\scripting\discord_calladmin.sp::CallAdmin_OnReportPost
L 02/05/2017 - 08:14:04: [SM]   [3] Call_Finish
L 02/05/2017 - 08:14:04: [SM]   [4] Line 603, C:\Users\David\Desktop\gameserver\calladmin.sp::Forward_OnReportPost
L 02/05/2017 - 08:14:04: [SM]   [5] Line 1097, C:\Users\David\Desktop\gameserver\calladmin.sp::ReportPlayer
L 02/05/2017 - 08:14:04: [SM]   [6] Line 1010, C:\Users\David\Desktop\gameserver\calladmin.sp::MenuHandler_ConfirmCall

I have done a number of things to try and troubleshoot. I double checked installation of CallAdmin and this plugin. Verified I had the correct Webhook URL for my channel and added /slack to the end of it. In the discord_calladmin.cfg I have tried both setting the bot name and leaving it blank. I've also tried using a variety of @mentions as well as leaving that field blank. Verified that it's asking for the calladmin Webhook. I am running the most recent version of Sourcemod (1.8.5970 for Windows). SteamWorks extension is installed and reporting as active when I type sm exts list. This error listed above is the only error happening at all on my server currently. There is no response on Discord at all.

I do not have the Sourcebans/Sourcecomms module included, is that required? It didn't appear so in the OP, so I did not try to install it yet as I didn't need it. I also only have calladmin and discord_calladmin installed, none of the previous CallAdmin extensions like MySQL, client, steam, etc. Any idea what I can try to resolve the issue? I'm using the most current downloads from OP, all fresh from today.
mlov420 is offline
headline
SourceMod Moderator
Join Date: Mar 2015
Old 02-05-2017 , 13:43   Re: [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
Reply With Quote #47

Quote:
Originally Posted by mlov420 View Post
-snip-
I created a pull request to fix the issue. You're not really doing anything wrong.

https://gitlab.com/Zipcore/Discord/m...quests/1/diffs

The reason you're seeing this issue is because the following cvars are set to empty. A temporary fix would be to put something random in them until the pr gets merged.

Code:
discord_calladmin_remove
discord_calladmin_remove2
EDIT: It was already merged. Check the latest version

Last edited by headline; 02-05-2017 at 13:52.
headline is offline
mlov420
Senior Member
Join Date: May 2013
Old 02-05-2017 , 15:12   Re: [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
Reply With Quote #48

Quote:
Originally Posted by Headline View Post
I created a pull request to fix the issue. You're not really doing anything wrong.

EDIT: It was already merged. Check the latest version
Thank you and Zipcore both for your quick follow up. I just tested and it now works perfect. Thanks again, it's very much appreciated.
mlov420 is offline
Treek
Junior Member
Join Date: Feb 2017
Old 02-22-2017 , 01:54   Re: [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
Reply With Quote #49

It won't show any mutes or anything :/, I installed the sourcebans that you said to and tried about everything. :/

Code:
02/22/2017 - 00:49:06: [discord.smx] [OnRequestComplete] Bad Request! Error Code: [400]. Check your message, the API doesn't like it! Message: "{"attachments": [{"color": "#2222ff","title": "View on Sourcebans","title_link": "http://vicarious.cf/SourceBans/index.php?p=commslist&searchText=STEAM_1:1:64661717","fields": [{"title": "Player","value": "Waveidz ( STEAM_1:1:64661717 )","true": false},{"title": "Admin","value": "Treek","short": true},{"title": "Mute Length","value": "111 mins (1 hour)","short": true},{"title": "Reason","value": "","short": true}]}]}
Code:
"sourcebans"
	{
		"url"
"https://discordapp.com/api/webhooks/please-Ignore thiiis/slack"
	}
	

"sourcecomms"
	{
		"url"	"https://discordapp.com/api/webhooks/nothing!/slack"
	}
and yet the !calladmin stuff shows!

Last edited by Treek; 02-22-2017 at 14:55.
Treek is offline
thedudeguy1
Senior Member
Join Date: Oct 2014
Location: 127.0.0.1
Old 02-22-2017 , 13:24   Re: [ANY] Discord/Slack API (CallAdmin, SourceBans, ...)
Reply With Quote #50

Hello. I'm a complete novice with discord webhooks and I am trying to get the calladmin to work with discord but I can't seem to get it working. I tried using sm_testdiscord with my webhook :
Code:
sm_testdiscord https://discordapp.com/api/webhooks/severalNumbers/aCombinationOfALotOfNumbersAndLettersVaryingInCase hello?
and the following was returned:

Code:
Error: Webhook: https://discordapp.com/api/webhooks/severalNumbers/onlyTheFirstEightCharactersOfTheStringThatComesAfterTheNumbers - Url:
Is there something I'm doing wrong?
__________________
A computer is like an Old Testament god, with a lot of rules and no mercy. -Joseph Campbell
thedudeguy1 is offline
Reply



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 19:21.


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