mirror of https://gitlab.com/litecord/litecord.git
blueprints.invites: call create_guild_settings
This commit is contained in:
parent
809518f85f
commit
6865a5772f
|
|
@ -9,7 +9,7 @@ from ..schemas import validate, INVITE
|
||||||
from ..enums import ChannelType
|
from ..enums import ChannelType
|
||||||
from ..errors import BadRequest, Forbidden
|
from ..errors import BadRequest, Forbidden
|
||||||
from .channels import channel_check
|
from .channels import channel_check
|
||||||
from .guilds import guild_check
|
from .guilds import guild_check, create_guild_settings
|
||||||
from ..utils import async_map
|
from ..utils import async_map
|
||||||
|
|
||||||
log = Logger(__name__)
|
log = Logger(__name__)
|
||||||
|
|
@ -167,6 +167,8 @@ async def use_invite(invite_code):
|
||||||
VALUES ($1, $2)
|
VALUES ($1, $2)
|
||||||
""", user_id, guild_id)
|
""", user_id, guild_id)
|
||||||
|
|
||||||
|
await create_guild_settings(guild_id, user_id)
|
||||||
|
|
||||||
# add the @everyone role to the invited member
|
# add the @everyone role to the invited member
|
||||||
await app.db.execute("""
|
await app.db.execute("""
|
||||||
INSERT INTO member_roles (user_id, guild_id, role_id)
|
INSERT INTO member_roles (user_id, guild_id, role_id)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue