File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed
Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -156,29 +156,29 @@ async def make_schedule(update, context):
156156async def check_day_tab (day , slots , cronograma , i ):
157157 try :
158158 if day != DIAS [slots [i - 1 ].code [0 ]]:
159- cronograma += f'\n *{ day } :*\n '
159+ cronograma .append ('' )
160+ cronograma .append (f'*{ day } :*' )
160161 except Exception as e :
161162 print ("ERROR " , e )
162- return cronograma
163163
164164
165165async def show_schedule (update , context ):
166166 slots = Slot .select ()
167167 projects = Project .select ()
168- cronograma = ''
168+ cronograma = []
169169
170170 for i , slot in enumerate (slots ):
171171 day = DIAS [slot .code [0 ]]
172- cronograma = await check_day_tab (day , slots , cronograma , i )
172+ await check_day_tab (day , slots , cronograma , i )
173173
174174 for project in projects :
175175 if project .slot_id == slot .id :
176- cronograma += f'{ slot .start } :00 *{ escape_markdown (project .name )} *\n '
177- cronograma += f'Owner: @{ escape_markdown (project .owner .username )} \n '
176+ cronograma . append ( f'{ slot .start } :00 *{ escape_markdown (project .name )} *' )
177+ cronograma . append ( f'Owner: @{ escape_markdown (project .owner .username )} ' )
178178
179179 await context .bot .send_message (
180180 chat_id = update .message .chat_id ,
181- text = cronograma ,
181+ text = ' \n ' . join ( cronograma ) ,
182182 parse_mode = 'MarkdownV2'
183183 )
184184
You can’t perform that action at this time.
0 commit comments