Can't get Discord webhooks to work

I've been trying to get a bunch of plugins to print logs to discord via a webhook URL, but there is no explanation anywhere online and the one discord provides only seems to explain how to use it via github..

What I did is; created a webhook via integrations on my discord server, give it a name, select which channel to log information to and then simply copy that webhook URL and paste it into the <plugin> config.json. It then reads like this:

{
"Discord hook url": "https://discord.com/api/webhooks/775996793284067368/J8hxitgRNUiV1Ljiz_l6gujaVll4NtCz3HYsYaTLrOw0JWKXUGgw3ICNu4II75ykmBVc",
"Print logs to console": true,
"Print logs to Discord": true,
"Print logs to file": true
}
(I've changed a couple of letters and digits so its not the exact webhook I'm trying to test), however this does absolutely nothing! I can find all the information logged onto the server itself but it is not an effective admin tool in that form.

Can anyone help, I've spent far too long on this now!!

Did you reload the plugin after editing the configuration? There's no known issues with webrequests (and therefore webhooks), and there are quite a few people that use them.

Yeah they are all loaded up properly, that isn't the issue. It just doesn't actually send the information though to the webhook channel on discord.

So what the actual set-up as such is correct? I've seen some suggestions to do 'discordapp.com/api/etc.', with the app being added in with the link.

Any ideas? :S

Jordane

Yeah they are all loaded up properly, that isn't the issue. It just doesn't actually send the information though to the webhook channel on discord.

So what the actual set-up as such is correct? I've seen some suggestions to do 'discordapp.com/api/etc.', with the app being added in with the link.

Any ideas? :S

Shouldn't be any different than any other webhook usage.

Hahah see I hear that kind of thing a lot, but as someone thats entirely unfamiliar with webhooks I find the tutorials online quite confusing and there's nothing specific to Rust webhook tutorial instruction. The one discord gives, and in turn most of Oxide plugin developers link only seems to explain how to use github, which in turn seems to be a very coding oriented site which is not for those who know nothing of the sort.

I just copied the webhook link and plopped it in the plugins config inbetween the apostrophes and it simply doesn't work for most plugins. Rustcord works fine with the bot I made, but teams logger works intermittently - sending some logs and others not (only works when using discordapp/api). Then the stash warning webhook URL does not work at all, with no messages sent at all no matter what I try. Then Tickets webhook is the same, though that seems to want me to use an app called slack for whatever reason.

Not sure if I'm dumb or if its all a little confusing lol.

It would be the same as the linked page, just without the /github addition. I use Discord webhooks in numerous plugins, such as Keywords. There isn't really much to it, though some plugins may not handle it properly in terms of content sent. One thing that Discord does require for the past year or so is the Content-Type being set properly, which you can see in my Keywords plugin.
I am also fighting this battle. I installed Stash Traps but cannot get it to communicate with Discord no matter what I try. 

What I've done:
  1. Created a webhook in Discord
  2. Copy/pasted that URL into the Stash Traps config folder
  3. Reloaded Stash Traps
  4. Verified admin permission in Permissions
  5. Enabled Stash Traps in game using /stash (this works)
  6. Experimented with how I obtain the stash (F1>Items>small stash, command line,  chat /stash (number))
  7. Verified that the stash generates an ID
Nothing works. It simply will not send information to Discord. I've tried digging it up and I've had a standard player dig it up. Nothing. I found a post suggesting that line 83 need to be corrected by swapping the "StashContainer stash" and "BasePlayer player."

I did so to create:
  • private void CanSeeStash(BasePlayer player, StashContainer stash)
This is did not work either after reloading Stash Traps. I would be forever grateful if someone could help me get this fixed. Any thoughts?
05d7ea627b889b7a3633886874e89988.jpg Gneissish
I am also fighting this battle. I installed Stash Traps but cannot get it to communicate with Discord no matter what I try. 

What I've done:
  1. Created a webhook in Discord
  2. Copy/pasted that URL into the Stash Traps config folder
  3. Reloaded Stash Traps
  4. Verified admin permission in Permissions
  5. Enabled Stash Traps in game using /stash (this works)
  6. Experimented with how I obtain the stash (F1>Items>small stash, command line,  chat /stash (number))
  7. Verified that the stash generates an ID
Nothing works. It simply will not send information to Discord. I've tried digging it up and I've had a standard player dig it up. Nothing. I found a post suggesting that line 83 need to be corrected by swapping the "StashContainer stash" and "BasePlayer player."

I did so to create:
  • private void CanSeeStash(BasePlayer player, StashContainer stash)
This is did not work either after reloading Stash Traps. I would be forever grateful if someone could help me get this fixed. Any thoughts?
The implementation or usage in one plugin isn't really the same as a webook not working in general. There are many factors that can cause something to "not work", with your issue likely being with the implementation, plugin being outdated, etc.
Wulf

Thank you for your reply. I tried Auto Stash Traps instead using the same implementation. Functions perfectly. 

My solution for the teams logger was that I had to reload it using an automated command 5 mins after every restart. It seems that it does not load up properly (at least in a way which the webhooks dont function correctly).

Jordane

My solution for the teams logger was that I had to reload it using an automated command 5 mins after every restart. It seems that it does not load up properly (at least in a way which the webhooks dont function correctly).

That sounds like it is using the Discord extension, not webhooks.