blueprints.invites: call create_guild_settings

This commit is contained in:
Luna Mendes 2018-10-19 04:32:26 -03:00
parent 809518f85f
commit 6865a5772f
1 changed files with 3 additions and 1 deletions

View File

@ -9,7 +9,7 @@ from ..schemas import validate, INVITE
from ..enums import ChannelType
from ..errors import BadRequest, Forbidden
from .channels import channel_check
from .guilds import guild_check
from .guilds import guild_check, create_guild_settings
from ..utils import async_map
log = Logger(__name__)
@ -167,6 +167,8 @@ async def use_invite(invite_code):
VALUES ($1, $2)
""", user_id, guild_id)
await create_guild_settings(guild_id, user_id)
# add the @everyone role to the invited member
await app.db.execute("""
INSERT INTO member_roles (user_id, guild_id, role_id)