1"use strict";(self.webpackChunkphpvms_docs=self.webpackChunkphpvms_docs||[]).push([[7746],{29848(e,n,i){i.r(n),i.d(n,{assets:()=>d,contentTitle:()=>r,default:()=>h,frontMatter:()=>c,metadata:()=>t,toc:()=>a});const t=JSON.parse('{"id":"config/notifications","title":"Notifications","description":"phpvms sends event notifications to Discord via webhooks. Two webhooks are","source":"@site/docs/config/notifications.md","sourceDirName":"config","slug":"/config/notifications","permalink":"/8.x/config/notifications","draft":false,"unlisted":false,"editUrl":"https://github.com/phpvms/docs/tree/master/docs/config/notifications.md","tags":[],"version":"current","frontMatter":{"id":"notifications","title":"Notifications","sidebar_title":"Notifications"},"sidebar":"docs","previous":{"title":"Email","permalink":"/8.x/config/email"},"next":{"title":"Backups","permalink":"/8.x/config/backups"}}');var s=i(74848),o=i(28453);const c={id:"notifications",title:"Notifications",sidebar_title:"Notifications"},r=void 0,d={},a=[{value:"Public events",id:"public-events",level:3},{value:"Private events",id:"private-events",level:3},{value:"Discord setup",id:"discord-setup",level:2},{value:"1. Create the webhook",id:"1-create-the-webhook",level:3},{value:"2. Add to phpvms",id:"2-add-to-phpvms",level:3}];function l(e){const n={a:"a",h2:"h2",h3:"h3",img:"img",li:"li",p:"p",strong:"strong",ul:"ul",...(0,o.R)(),...e.components};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(n.p,{children:"phpvms sends event notifications to Discord via webhooks. Two webhooks are\nsupported:"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Public webhook"})," \u2014 for events visible to your community"]}),"\n",(0,s.jsxs)(n.li,{children:[(0,s.jsx)(n.strong,{children:"Private webhook"})," \u2014 for restricted events (separate channel, typically\nadmin-only)"]}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"public-events",children:"Public events"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"PIREP prefile"}),"\n",(0,s.jsx)(n.li,{children:"PIREP state changes (boarding, taxi, landed, etc)"}),"\n",(0,s.jsx)(n.li,{children:"PIREP filed"}),"\n",(0,s.jsx)(n.li,{children:"News added"}),"\n"]}),"\n",(0,s.jsx)(n.h3,{id:"private-events",children:"Private events"}),"\n",(0,s.jsxs)(n.ul,{children:["\n",(0,s.jsx)(n.li,{children:"User registrations"}),"\n"]}),"\n",(0,s.jsx)(n.h2,{id:"discord-setup",children:"Discord setup"}),"\n",(0,s.jsxs)(n.p,{children:["Webhooks are how Discord receives notifications from external services. Full\nDiscord docs:\n",(0,s.jsx)(n.a,{href:"https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks",children:"Intro to Webhooks"}),"."]}),"\n",(0,s.jsx)(n.h3,{id:"1-create-the-webhook",children:"1. Create the webhook"}),"\n",(0,s.jsx)(n.p,{children:"Edit the channel you want notifications in (you can move the webhook later)."}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{src:i(18802).A+"",width:"276",height:"85"})}),"\n",(0,s.jsxs)(n.p,{children:["Open ",(0,s.jsx)(n.strong,{children:"Integrations"}),", then ",(0,s.jsx)(n.strong,{children:"View Webhooks"}),"."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{src:i(28665).A+"",width:"928",height:"282"})}),"\n",(0,s.jsxs)(n.p,{children:["Click ",(0,s.jsx)(n.strong,{children:"Add Webhook"})," and fill in the details."]}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{src:i(46228).A+"",width:"781",height:"659"})}),"\n",(0,s.jsx)(n.p,{children:"Copy the webhook URL \u2014 you'll paste it into the admin panel next."}),"\n",(0,s.jsx)(n.p,{children:"Repeat if you want a separate private webhook for user registrations."}),"\n",(0,s.jsx)(n.h3,{id:"2-add-to-phpvms",children:"2. Add to phpvms"}),"\n",(0,s.jsx)(n.p,{children:"In the admin panel, paste the webhook URL into the corresponding setting:"}),"\n",(0,s.jsx)(n.p,{children:(0,s.jsx)(n.img,{src:i(13361).A+"",width:"1494",height:"419"})}),"\n",(0,s.jsx)(n.p,{children:"That's it \u2014 events fire to Discord from now on."})]})}function h(e={}){const{wrapper:n}={...(0,o.R)(),...e.components};return n?(0,s.jsx)(n,{...e,children:(0,s.jsx)(l,{...e})}):l(e)}},46228(e,n,i){i.d(n,{A:()=>t});
1const t=i.p+"assets/images/create-webhook-46b3b91a311a6486c8525736c253b3cf.png"},13361(e,n,i){i.d(n,{A:()=>t});const t=i.p+"assets/images/discord-setting-9bb49126229f75bc51d5a2255ae168de.png"},18802(e,n,i){i.d(n,{A:()=>t});const t=i.p+"assets/images/edit-channel-2dff52c379828c096f8045f9b0037fbd.png"},28665(e,n,i){i.d(n,{A:()=>t});const t=i.p+"assets/images/integrations-7d322d5d6d1a8064948c12fa93acdd8c.png"},28453(e,n,i){i.d(n,{R:()=>c,x:()=>r});var t=i(96540);const s={},o=t.createContext(s);function c(e){const n=t.useContext(o);return t.useMemo(function(){return"function"==typeof e?e(n):{...n,...e}},[n,e])}function r(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:c(e.components),t.createElement(o.Provider,{value:n},e.children)}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.