SnailyCAD / snaily-cadv4

💻 An open source Computer Aided Dispatch (CAD) for FiveM, this is a web based integration for communities who love police roleplaying and dispatching. Discord: https://discord.gg/eGnrPqEH7U
https://docs.snailycad.org/docs/getting-started
MIT License
140 stars 85 forks source link

discord variables #1179

Closed subtosharki closed 1 year ago

subtosharki commented 1 year ago

Describe the feature

when setting the channel of a discord webhook and adding an additional message, there should be set variables to access certain things like the users id of whatever is happening.

this is mainly so when a webhook gets sent out we can set it up so that it @s the users that webhook is for, obviously this wouldnt be for every webhook like bolo log wouldn't need this, 911, etc.

Additional Context

No response

casperiv0 commented 1 year ago

Can you provide an example for this?

subtosharki commented 1 year ago

this would be in the additional message box:

User: {discordID}

would print

User: 836262827252783

casperiv0 commented 1 year ago

Right, I know that, but for which actions will this be used? I’m asking fora real world example so I know what’s possible.

subtosharki commented 1 year ago

what do you mean by actions? webhooks?

casperiv0 commented 1 year ago

No. Where will you use the "{userId}"? Where is it needed? How is it useful? etc. That's what I'm asking. Actions meaning the current options for creating the webhooks (911-calls, bolos, warrants, ...)

casperiv0 commented 1 year ago

@subtosharki please see previous comment :)

subtosharki commented 1 year ago

it was a request by a member so when citations get sent out to discord we can set it up so the webhook @ the user thr citation is going to, same for arrest and all that

casperiv0 commented 1 year ago

Since this can't be supported in all webhook types, I'm not sure yet if this is necessary. Will see what I can do today/tomorrow

casperiv0 commented 1 year ago

Only {userId} is supported for Citizen Records webhook. Other webhook types don't have any Discord data. Out now, please update you CAD.