1
Fork 0
mirror of https://github.com/Steffo99/greed.git synced 2024-11-21 21:44:19 +00:00

Make the welcome message toggleable with a config option (closes #69)

This commit is contained in:
Steffo 2020-09-06 18:32:48 +02:00
parent adb0397f67
commit 378bbbad43
2 changed files with 6 additions and 2 deletions

View file

@ -5,7 +5,7 @@
# Config file parameters # Config file parameters
[Config] [Config]
; Config file version. DO NOT EDIT THIS! ; Config file version. DO NOT EDIT THIS!
version = 18 version = 19
; Set this to no when you are done editing the file ; Set this to no when you are done editing the file
is_template = yes is_template = yes
@ -90,6 +90,9 @@ phone_required = yes
full_order_info = no full_order_info = no
; Allow balance refill during the order checkout in case of unsufficient balance ; Allow balance refill during the order checkout in case of unsufficient balance
refill_on_checkout = yes refill_on_checkout = yes
; Display welcome message (conversation_after_start) when the user sends /start
display_welcome_message = yes
# Exception reporting settings # Exception reporting settings
[Error Reporting] [Error Reporting]

View file

@ -106,7 +106,8 @@ class Worker(threading.Thread):
# noinspection PyBroadException # noinspection PyBroadException
try: try:
# Welcome the user to the bot # Welcome the user to the bot
self.bot.send_message(self.chat.id, self.loc.get("conversation_after_start")) if configloader.config["Appearance"]["display_welcome_message"] == "yes":
self.bot.send_message(self.chat.id, self.loc.get("conversation_after_start"))
# If the user is not an admin, send him to the user menu # If the user is not an admin, send him to the user menu
if self.admin is None: if self.admin is None:
self.__user_menu() self.__user_menu()