Commit Graph

23 Commits

Author SHA1 Message Date
Cynthia Foxwell f162f0ab60 Update license headers 2021-09-24 11:33:06 -06:00
Luna fdc5630f87 guilds: verify owner before removing member 2021-09-20 23:22:44 -03:00
Luna ad6643421d add route to fetch notes from singular users 2020-07-29 17:39:27 -03:00
Luna 44315b0845 move add_member to common.guilds
this decreases copy-pasting of the 'INSERT INTO members' line, and
add_member gets a `basic` kwarg to remove gateway side-effects

 - errors: add 40007 error code to ERR_MSG_MAP
 - invites: use 40007 and 10006 error codes
2019-10-26 11:57:43 -03:00
Luna 23034aadbd errors: add 30016 err code to ERR_MSG_MAP 2019-10-26 11:49:54 -03:00
Luna a67b6580ba make other blueprints use common, etc 2019-10-25 13:33:52 -03:00
Luna 83a1c1ae29 black fmt pass 2019-10-25 07:27:50 -03:00
Luna 1b4c39fe23 errors: check args[0] for integer values and convert to ERR_MSG_MAP
- channels: s/weeks/days
 - schemas: handle reqjson being None on validate()
2019-09-01 15:25:28 -03:00
Luna eeee05cfe9 webhooks: add more impls 2019-03-17 03:45:31 -03:00
Luna 1bc04449bd add some dummy impl for vws v4
will be removed as this should be on the voice server instead. litecord
manages simple voice state and dispatches voice state updates (such as
speaking=1)
2019-03-01 02:25:52 -03:00
Luna 3247323a95 errors: only use err msg map when args don't have it 2019-02-16 21:13:16 -03:00
Luna d2353d2495 errors: add ERR_MSG_MAP
Closes #31.
2019-01-28 19:31:45 -03:00
Luna 53d7515f8c all: update copyright year 2019-01-26 19:25:46 -03:00
Luna 2632d033fa all: add GPL header 2018-12-07 02:14:58 -03:00
Luna Mendes da8b049174 channel.messages: add permission checks
this commit only adds permission checking to most parts of the
message endpoints.

 - channel.messages: fix extract_limit's default param
 - channel.messages: check send_messages, mention_everyone, send_tts_messages
 - channel.messages: check manage_messages
 - blueprints.checks: add guild_perm_check, channel_perm_check
 - errors: add error_code property, change some inheritance
 - permissions: fix base_permissions
 - storage: fix get_reactions
 - storage: remove print-debug
 - run: use error_code property when given
2018-11-04 19:55:21 -03:00
Luna Mendes 33f893c0ff all: add ratelimit implementation
haven't tested yet, but it should work in theory.

 - gateway.websocket: add the 3 main ws ratelimits
 - litecord: add ratelimits package
 - ratelimits.main: add implementation
 - run: add app_set_ratelimit_headers
2018-11-04 02:06:40 -03:00
Luna Mendes 59127ad197 blueprints.channels: add message sending
It is clunky when sending messages as Atomic, nor we have proper channel
management, but it works.

 - dispatcher: add sub_many
 - errors: add failsafe on LitecordError.message
 - errors: add ChannelNotFound
 - gateway.websocket: add dispatcher to WebsocketObjects
 - schemas: add regexes for mentions
 - storage: add get_channel, get_message
2018-07-03 01:02:26 -03:00
Luna Mendes 4ea3d353b3 litecord.blueprints: add channels blueprint 2018-07-02 05:06:57 -03:00
Luna Mendes 21da0e0d3a blueprints.guild: add implementations for more routes
- Pipfile: add Cerberus for data validation
 - blueprints.guilds: add guild_owner_check
 - blueprints.guilds: simplify GUILD_MEMBER_UPDATE dispatch
 - litecord: add schemas.py
 - run: get json of errors
2018-06-23 17:19:22 -03:00
Luna Mendes b085df207d blueprints.guilds: add implementations for some routes
- errors: add NotFound, GuildNotFound
 - storage: add get_member_data_one, get_member_multi
2018-06-21 16:54:23 -03:00
Luna Mendes f5ea44c8d7 blueprints: add users.py blueprint
- errors: change AuthError to Unauthorized and Forbidden
 - auth: fix bug on token_check
 - storage: add Storage.get_user_guilds
2018-06-20 23:29:30 -03:00
Luna Mendes 39d85d1a1a add basis of websockets 2018-06-17 17:07:52 -03:00
Luna Mendes f7f387dcf0 litecord.blueprints: add auth blueprint
- Pipfile: add bcrypt and itsdangerous
 - litecord: add errors module
 - litecord: add snowflake module
 - run: add error handlers

 - schema: add UNIQUE constraint to users.email
   - remove users.password_salt
2018-06-17 04:09:29 -03:00