CXuesong / Serilog.Sinks.Discord

A simple WIP Discord logging sink for Serilog.
Apache License 2.0
1 stars 0 forks source link

how to obtain my discord token needed for the sink? #1

Closed jacobdeboer33 closed 4 years ago

jacobdeboer33 commented 4 years ago

Hi there

I wanted to try your Discord sink. I need a webhook id and token to do this. On Discord I can get a url containing a long string (this is the id I think?). How do I get the token? I used another Nuget package to write to Discord, and this package only needed the complete url. So how can I get the token? Maybe you can update your readme?

Thanks, Jacob

CXuesong commented 4 years ago

Updated README.md.

Basically you just need to match your webhook URL with the following pattern:

https://discordapp.com/api/webhooks/[YOUR_WEBHOOK_ID]/[YOUR_WEBHOOK_TOKEN]

where Webhook ID is a number, and Webhook token is a string.

jacobdeboer33 commented 4 years ago

Hi CXuesong

Thanks for your reply. This will help

jacobdeboer33 commented 4 years ago

Maybe you can even improve the code by doing the parsing of the URL in your code. This way the end users can insert the complete url as a parameter.

Thanks, Jacob

CXuesong commented 4 years ago

Uhmm... I think this would be a good idea.

I used to be hesitating about this, as the action of parsing introduces instability and possibility to make mistake.

Let me re-open the issue until I solve it.

CXuesong commented 4 years ago

Relased in v0.4.0.