Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Weather-Music-Chatbot/greetings.py
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
22 lines (21 sloc)
950 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Chatbot should introduce itself when it is added to a Discord server. | |
import random | |
chatbotName = "Hedgehog" | |
def greetings(): | |
print("I am " + chatbotName + ".") | |
name = input("What's your name?\n") | |
greet = list(("Hi ", "Hello ", "Hiya ", "Sup ", "Hey ", "Hey there ", "Bonjour ")) | |
out = random.choice(greet) | |
print(out + name + "!") | |
if name == "Hedgehog": | |
sameName = list(("Wow! We share a name!", "What a coincidence!", "Looks like we both have the coolest name!")) | |
sameNameOut = random.choice(sameName) | |
print(sameNameOut) | |
else: | |
difName = list(("Cool name!", "I like that name!", "Cool name, but not as cool as mine though! :D")) | |
difNameOut = random.choice(difName) | |
print(difNameOut) | |
questionList = list(("Feel free to ask me a question!", "If you have a question, ask away!")) | |
questionEngage = random.choice(questionList) | |
print(questionEngage) | |
return name |