217 Commits

Author SHA1 Message Date
Flam3rboy
ea676ddd03 🔒 register proxy ip check 2021-06-27 23:14:13 +02:00
Flam3rboy
9b59296af5 🐛 fix CORS 2021-06-26 19:48:20 +02:00
Flam3rboy
2be07d2f73 empty messages check + allowed mentions 2021-06-23 19:23:41 +02:00
Flam3rboy
295fbabf0d 🎨 move widget templates to assets 2021-06-22 20:58:17 +02:00
Flam3rboy
bb0dec2a9f 🎨 clean up code
widget.json.ts: just return instead of long if statement + add ?. operators for error handling
widget.png.ts make path universal
widget.ts: remove unnecessary guild db query as getPermission already checks it
Widget.ts make parameters required
2021-06-22 18:41:21 +02:00
Umimaso
f10df31f5c feat: add widget endpoints
Implemented the four widget related endpoints of the api. Partial user
object being returned as part of the widget.json endpoint [1] is an
intentional choice related to privacy [2].

The widget.json endpoint will require additional changes upon completion
of other work. Member details will need to return extra key/values for
connected users to voice channels. An additional avatar_url value will
hold an unique avatar url for the user + guild, fetched via a CDN
endpoint widget-avatars.

New dependencies `canvas` and `image-size`. Canvas is used to create the
widget.png endpoint image [3]. Image-size is used to set the canvas'
size to match the widget template images.

Use regex in determining if a NO_AUTHORIZATION_ROUTES is hit or not.

[1] https://discord.com/developers/docs/resources/guild#get-guild-widget
[2] https://github.com/discord/discord-api-docs/issues/1287
[3] https://discord.com/developers/docs/resources/guild#get-guild-widget-image

Closes: #9, #110
2021-06-19 14:50:11 +01:00
Flam3rboy
cbe60955b4 Guild invites 2021-06-02 19:22:22 +02:00
Flam3rboy
491565aef8 add explicit types to req and res 2021-05-31 21:03:09 +02:00
Flam3rboy
536900d255 🚧 dm channels 2021-05-31 20:32:23 +02:00
Flam3rboy
711dc1c4d4 🐛 fix getPublicUser 2021-05-30 22:14:35 +02:00
Flam3rboy
0feb3b635a Friends Relationships 2021-05-30 22:12:29 +02:00
Flam3rboy
c534248e0f Channel permission overwrites 2021-05-30 17:16:14 +02:00
Flam3rboy
3254c31e02 user avatar 2021-05-30 01:44:15 +02:00
Flam3rboy
d61bbe8293 message attachments 2021-05-30 01:44:09 +02:00
Flam3rboy
a86efe97bb 🎨 reformat 2021-05-29 18:22:52 +02:00
Flam3rboy
1383911771 automatically embed links in message 2021-05-28 22:40:34 +02:00
Flam3rboy
77528c40dc 🚧 permissions 2021-05-28 02:10:00 +02:00
Flam3rboy
b00815b025 Merge branch 'master' of https://github.com/fosscord/fosscord-api 2021-05-27 18:15:33 +02:00
Flam3rboy
d2e2822e89 🐛 fix bans 2021-05-27 18:15:31 +02:00
Flam3rboy
26d7ed8368 🐛 fix EMAIL_ALREADY_REGISTERED error message 2021-05-26 13:30:48 +02:00
Flam3rboy
e23c82fff0 optional GATEWAY .env variable 2021-05-26 13:30:29 +02:00
Flam3rboy
3c9e48cbda fix message loading 2021-05-26 13:30:10 +02:00
Flam3rboy
8f87546aeb use new config 2021-05-24 20:47:06 +02:00
Diego Magdaleno
28424ed950 Fix: No more type casting required, rather take the gernics 2021-05-23 13:43:38 -05:00
Diego Magdaleno
0b90d567c2 Meta: fix merge issues 2021-05-23 13:11:52 -05:00
Diego Magdaleno
55cf3b4b02 Update: Update fosscord-server-util to latest and fix issues with NULL and undefined 2021-05-23 12:44:02 -05:00
Bloom Sirenix
8d344a4d00 added basic error status
401 unauthorized
2021-05-23 04:51:02 +02:00
Diego Magdaleno
ff7985ad7d Config: Final config additons, now everything should work as desired 2021-05-22 18:51:46 -05:00
Bloom Sirenix
2c077dfa04
Update delete.ts 2021-05-22 23:56:04 +02:00
Bloom Sirenix
e874a946af Added password check
✔️ Only works if user types right password
🚫 No more kids getting there account deleted by there brother
2021-05-22 23:30:08 +02:00
Bloom Sirenix
d7d8868282 Made Delete request easier for users
less of an pain
2021-05-22 22:55:52 +02:00
Diego Magdaleno
e4a4759e97 Fix merge issues, update to reflect config changes and package.json 2021-05-22 15:55:45 -05:00
Bloom Sirenix
b45e372b6e Merge branch 'master' of https://github.com/bloomsirenix/fosscord-api 2021-05-22 22:36:59 +02:00
Bloom Sirenix
58b7ebdd5a Added Delete function and dummy disable function 2021-05-22 22:34:34 +02:00
Flam3rboy
71c0050a54 Message edit 2021-05-22 22:06:18 +02:00
Flam3rboy
b5f8a2e4e1 reactions bulk remove 2021-05-22 21:13:14 +02:00
afeuerstein
8375383e5c throw GUILD_ROLE_DELETE event 2021-05-22 19:35:53 +02:00
Flam3rboy
159ff75944 Reactions 2021-05-22 17:40:28 +02:00
Flam3rboy
f72156a40d invites TTL 2021-05-22 17:40:23 +02:00
Flam3rboy
4715ef1eab createChannel() 2021-05-22 17:40:10 +02:00
Flam3rboy
8a13a1f2ea 🎨 Move member routes in separate files 2021-05-22 17:39:28 +02:00
Diego Magdaleno
05057b922a Config: Refactor config method, so we have a new get all option, fix issues in configurations 2021-05-21 18:18:58 -05:00
Flam3rboy
d48b286e4b 🎨 refactor/format 2021-05-21 22:12:21 +02:00
Flam3rboy
f435d33da1 Message Pins 2021-05-21 21:59:19 +02:00
Flam3rboy
350b932ef6 🚧 read state 2021-05-21 21:59:04 +02:00
Flam3rboy
6af753f4e0 sendMessage() function 2021-05-21 21:58:41 +02:00
Diego Magdaleno
e3f6a29df7 Config: First rewrite of config and working implementation of getting values 2021-05-19 20:39:31 -05:00
Flam3rboy
89e0e2ebdc load gateway url from config 2021-05-18 22:05:25 +02:00
Diego Magdaleno
466c72d65f Config: Those bracks dont go there 2021-05-15 18:23:01 -05:00
Diego Magdaleno
fc2ae1a41e Config: Redo config to be more straight to the point 2021-05-15 16:57:31 -05:00