iteebot/bot.py
async def _addcourse_handler(self, 
                           message,
                           role_id,
                           course_code,
                           course_name_en,
                           course_name_fi):
        """
        Handler for the addcourse command. Upon receiveing this command, the
        bot will post a new signup message to the desingated signup channel,
        using the message template from configuration. After confirming that
        the message has been posted, the bot creates a database record for the
        new course that associates the message ID with the course, and 
        especially course's role ID. 
        
        * message (Message) - a discord.py message object
        * role_id (int) - ID of an existing role
        * course_code (str) - course's official code
        * course_name_en (str) - course's name in English
        * course_name_fi (str) - course's name in Finnish
        """
        
        channel = self.get_channel(self._cfg["SIGNUP_CHANNEL"])
        signup = await channel.send(
            self._cfg["MESSAGES"]["SIGNUP"].format(
                code=course_code,
                name_en=course_name_en,
                name_fi=course_name_fi,
            )
        )
        with Session(self._engine) as s:
            course = db.Course(
                code=course_code,
                name_fi=course_name_fi,
                name_en=course_name_en,
                role_id=int(role_id),
                message_id=signup.id
            )
            s.add(course)
            s.commit()

        Handler for the addcourse command. Upon receiveing this command, the
        bot will post a new signup message to the desingated signup channel,
        using the message template from configuration. After confirming that
        the message has been posted, the bot creates a database record for the
        new course that associates the message ID with the course, and 
        especially course's role ID. 
        
        * message (Message) - a discord.py message object
        * role_id (int) - ID of an existing role
        * course_code (str) - course's official code
        * course_name_en (str) - course's name in English
        * course_name_fi (str) - course's name in Finnish
        
Handler for the addcourse command. Upon receiveing this command, the
bot will post a new signup message to the desingated signup channel,
using the message template from configuration. After confirming that
the message has been posted, the bot creates a database record for the
new course that associates the message ID with the course, and
especially course's role ID.


Handler for the addcourse command . Upon receiveing this command the bot will post a new signup message to the desingated signup channel using the message template from configuration . After confirming that the message has been posted the bot creates a database record for the new course that associates the message ID with the course and especially course ' s role ID .
async def _addcourse_handler(self, 
                           message,
                           role_id,
                           course_code,
                           course_name_en,
                           course_name_fi):
        channel = self.get_channel(self._cfg["SIGNUP_CHANNEL"])
        signup = await channel.send(
            self._cfg["MESSAGES"]["SIGNUP"].format(
                code=course_code,
                name_en=course_name_en,
                name_fi=course_name_fi,
            )
        )
        with Session(self._engine) as s:
            course = db.Course(
                code=course_code,
                name_fi=course_name_fi,
                name_en=course_name_en,
                role_id=int(role_id),
                message_id=signup.id
            )
            s.add(course)
            s.commit()
async def _addcourse_handler ( self , message , role_id , course_code , course_name_en , course_name_fi ) : channel = self . get_channel ( self . _cfg [ "SIGNUP_CHANNEL" ] ) signup = await channel . send ( self . _cfg [ "MESSAGES" ] [ "SIGNUP" ] . format ( code = course_code , name_en = course_name_en , name_fi = course_name_fi , ) ) with Session ( self . _engine ) as s : course = db . Course ( code = course_code , name_fi = course_name_fi , name_en = course_name_en , role_id = int ( role_id ) , message_id = signup . id ) s . add ( course ) s . commit ( )
Handler for the addcourse command.
Handler for the addcourse command .
"""
        Handler for the addcourse command. Upon receiveing this command, the
        bot will post a new signup message to the desingated signup channel,
        using the message template from configuration. After confirming that
        the message has been posted, the bot creates a database record for the
        new course that associates the message ID with the course, and 
        especially course's role ID. 
        
        * message (Message) - a discord.py message object
        * role_id (int) - ID of an existing role
        * course_code (str) - course's official code
        * course_name_en (str) - course's name in English
        * course_name_fi (str) - course's name in Finnish
        """
self
message
role_id
course_code
course_name_en
course_name_fi