def run(self): while True: message_text = fake.sentence(nb_words=10, variable_nb_words=True, ext_word_list=None) receiver = users[randint(0, users_count - 1)] user.create_message(self.connection, message_text, self.user_id, receiver)
def run(self): while True: message_text = fake.sentence(nb_words=10, variable_nb_words=True, ext_word_list=None) receiver = users[randint(0, users_count - 1)] user.create_message(self.connection, message_text, self.user_id, receiver) print(f'`{self.username}` sent message to `{receiver}`: `{message_text}`') time.sleep(1)
def message_text(event): line_bot_api.reply_message( event.reply_token, main.create_message(latitude=event.message.latitude, longitude=event.message.longitude))
import main print(main.create_message('グー'))
def message_text(event): line_bot_api.reply_message(event.reply_token, main.create_message(event.message.text))