Skip to content

Instantly share code, notes, and snippets.

@2011945
Last active August 20, 2020 02:34
Show Gist options
  • Save 2011945/53973157304913ac58f33855d922ba8a to your computer and use it in GitHub Desktop.
Save 2011945/53973157304913ac58f33855d922ba8a to your computer and use it in GitHub Desktop.
#open with Pycharm or idle. this is python file.
from discord_webhook import DiscordWebhook, DiscordEmbed
while True:
which = str(input("shout or chat?\n"))
shout = str("shout")
chat = str("chat")
if which == shout:
embedortext = str(input("embed or text?\n"))
if embedortext == "embed":
embedshoutmsg = input("message?\n")
embedshoutwebhook = DiscordWebhook(
url='') # webhook link (announcement channel)
embed = DiscordEmbed(title='AeroEpic Shout', description=embedshoutmsg, color=242424)
embedshoutwebhook.add_embed(embed)
response = embedshoutwebhook.execute()
print("success to send message.")
stop = str(input("write stop to stop this program"))
if stop == "stop":
break
if embedortext == "text":
textshoutmsg = input("message?\n")
textshoutwebhook = DiscordWebhook(
url='',# webhook link (announcement channel)
content=textshoutmsg)
response = textshoutwebhook.execute()
print("success to send message.")
stop = str(input("write stop to stop this program"))
if stop == "stop":
break
if which == chat:
chatmsg = input("message?\n")
chatwebhook = DiscordWebhook(
url='',# webhook link (chatting channel)
content=chatmsg)
response = chatwebhook.execute()
print("success to send message.")
stop = str(input("write stop to stop this program"))
if stop == "stop":
break
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment