Commit Graph

921 Commits

Author SHA1 Message Date
Luna 060e91907d icons: properly remove unused vars 2019-03-15 01:26:27 -03:00
Luna c2c3ea3091 icons: remove double get_guild_splash handler
- icons: remove print debug
2019-03-15 00:08:41 -03:00
Luna 5862dce922 icons: add getters for splash and banner
- fix channel-icons scope fetch
2019-03-15 00:01:49 -03:00
Luna 8605e1f59f Merge branch 'master' into guild-features 2019-03-14 16:23:38 -03:00
Luna e6e442f112 schemas: enable nullable for region fields
Closes #40.
2019-03-14 16:18:44 -03:00
Luna 47db480209 register: properly handle missing j.invite
- schemas: fix 80col line breaks
2019-03-13 22:59:27 -03:00
Luna 1ad328904d admin_schemas: move FEATURES schema to there 2019-03-13 18:35:01 -03:00
Luna a12c63a7bf add impl for VIP_REGIONS
(untested)

 - lvsp_manager: add Region, and store vip region status in it
 - lvsp_manager: add LVSPManager.region
2019-03-13 18:28:48 -03:00
Luna 977fa95ff2 admin_api.features: delete vanity invites when guild loses feature
- guilds: make _vanity_inv -> vanity_invite exportable function
2019-03-13 05:07:10 -03:00
Luna 6763f2c501 guilds: add VANITY_URL feature check when editing vanity 2019-03-13 05:04:48 -03:00
Luna afcdd145f4 emoji: add MORE_EMOJI feature support
bumps emoji limit to 200 for both static and animated, needs more
looking.

 - storage: add Storage.has_feature
2019-03-13 05:03:26 -03:00
Luna 5c51894807 guilds: add failsafe check for same invite 2019-03-13 04:49:50 -03:00
Luna f0d4c84e68 guilds: add implementation for vanity invites
I'm not proud of it, especially that we couldn't use much SQL power and
things are laid off to Storage calls. It works, though

 - schemas: add VANITY_URL_PATCH
2019-03-13 04:48:25 -03:00
Luna 633cd730c0 guilds: add basic vanity urls
- add vanity_invites table
2019-03-13 04:28:23 -03:00
Luna 0dbfb3a210 admin_api.features: dispatch GUILD_UPDATE on feature changes
- storage: fix typing on get_guild_full
2019-03-13 04:09:43 -03:00
Luna 16e583179c schemas: fix coerce
- run: change features_admin base to /admin/guilds
2019-03-11 02:12:09 -03:00
Luna 4bb3cad43e migration.scripts: add NOT NULL and DEFAULT to guilds.features 2019-03-11 02:04:07 -03:00
Luna 87781c4606 admin_api.features: remove unused import 2019-03-11 01:45:49 -03:00
Luna 65b4b28d89 schemas: use coerce to Feature instead of guild_features type
cleaner to write code for.

 - admin_api.features: support that
2019-03-11 01:43:11 -03:00
Luna c325543242 enums: move Feature to EasyEnum
- schemas: add validator for guild_features type
2019-03-11 01:40:18 -03:00
Luna 2c1c384409 admin_api.features: make features input as a list
- add PATCH /:id/features
 - enums: add Feature enum
 - schemas: add FEATURES
 - storage: add Storage.guild_features
 - types: add return type to timestamp_
2019-03-11 01:36:52 -03:00
Luna 073f47e0f5 add draft for features_admin and add guilds_admin 2019-03-09 04:09:55 -03:00
Luna a04b3acfaa storage: add guild.features in get_guild
- remove features and guild_features tables
2019-03-09 03:27:12 -03:00
Luna fa73e90170 Merge branch 'voice' into 'master'
Voice: Basics

See merge request litecord/litecord!24
2019-03-09 01:59:22 +00:00
Luna 1bf59e3106 lvsp: remove sequence numbers
thinking about it guaranteeing consistency via sequence numbers isn't
really needed when we already have Litecord as a single source of
truth.

plus, it keeps the protocol simple.
2019-03-06 04:04:00 -03:00
Luna 76a8038cb4 lvsp: add docs for voice state create and destroy
finishes all TODOs.
2019-03-06 03:47:40 -03:00
Luna b8c3208fa4 lvsp: remove CHANNEL_UPDATE
bitrate is a client thing. lol

 - lvsp: remove ChannelProperties, same applies to CHANNEL\_REQ
 - voice.manager: remove channel\_properties
2019-03-06 02:19:28 -03:00
Luna b8f5e01106 lvsp: add CHANNEL_REQ.token 2019-03-06 00:44:16 -03:00
Luna a846c57ae8 storage: inject message.member field
required some changes around how we fetch data from the members table,
but it works
2019-03-05 18:31:33 -03:00
Luna 7b4aaabcbf storage: better fix for message.webhook_id
the old fix only works for the return value in message create, where as
it should be in Storage.get_message instead so that the bug doesn't
happen to the other routes
2019-03-05 16:30:38 -03:00
Luna 67ae2385b5 Merge branch 'master' into voice 2019-03-05 16:27:31 -03:00
Luna 899f19b24c gateway.websocket: fix some errors
right now requesting a voice channel won't return ANY voice events back
to the client, causing a visual/behavioral "lock" on the official
client, since there isn't any available voice servers.
2019-03-05 01:35:17 -03:00
Luna 30d9520935 lvsp: remove TODO 2019-03-05 01:18:53 -03:00
Luna d21b3c8f2a lvsp: add "common logic scenarios" 2019-03-05 00:59:37 -03:00
Luna 579a71dd9b lvsp_conn: add basic INFO handling for channel assign
- lvsp: finish defining data for channel info messages
 - lvsp_conn: add send_info()
 - lvsp_opcodes: add InfoTable, InfoReverse
 - voice.manager: handle channels without bitrate
2019-03-04 22:46:09 -03:00
Luna 00100f9abb voice.manager: add VST_REQ call 2019-03-04 21:32:04 -03:00
Luna e2af6b6370 voice: more voice goodies
- lvsp manager: change internal structure of lvsp conns
 - voice.manager: add incomplete impl for creating a channel
2019-03-04 20:46:14 -03:00
Luna 9dab5b20ae typing, episode 2 2019-03-04 15:48:51 -03:00
Luna ed3c436b6d channels, guild.roles, user.billing: typing fixes 2019-03-04 15:19:05 -03:00
Luna 68c6442375 storage: fix more type hints, handle None on more places 2019-03-04 15:12:38 -03:00
Luna bbf80f72b1 fix tests and an ugly circular import 2019-03-04 05:24:40 -03:00
Luna d91030a2c1 typings, episode 1
(i installed mypy and its beautiful)
2019-03-04 05:09:04 -03:00
Luna 506bd8afbe pipenv: add mypy 2019-03-04 04:30:27 -03:00
Luna 627d87b4a7 lvsp_conn: remove unused var 2019-03-04 03:20:34 -03:00
Luna 0759a52046 pubsub.lazy_guild: s/pop/remove on remove_channel 2019-03-04 03:16:28 -03:00
Luna ad7f93b40a add guild.region = null consistency checker
as soon as a voice region is added, we should move all guilds to it. or
if there are any guilds with a NULL region, we select one at random.

region being NULL causes the client to be unable to change it, so..

 - channels: fix update handlers for guild channels
2019-03-04 03:00:46 -03:00
Luna 336f3a6eaf lvsp_conn: handle errors when connecting to voice server 2019-03-04 01:29:14 -03:00
Luna 9d80cb5564 admin_api.voice: handle UniqueViolationError 2019-03-04 01:26:53 -03:00
Luna 2d7dc05453 lvsp_manager: fix bug when fetching regions 2019-03-04 01:22:18 -03:00
Luna 4a792966f1 voice: fix bugs 2019-03-04 01:21:06 -03:00