Pusing latest rev to GitHub
This commit is contained in:
parent
abf95b4767
commit
2cd52b9e72
BIN
DiscordBot/badCurrentStory.mp3
Normal file
BIN
DiscordBot/badCurrentStory.mp3
Normal file
Binary file not shown.
BIN
DiscordBot/badCurrentTTS.mp3
Normal file
BIN
DiscordBot/badCurrentTTS.mp3
Normal file
Binary file not shown.
BIN
DiscordBot/currentTTS.wav
Normal file
BIN
DiscordBot/currentTTS.wav
Normal file
Binary file not shown.
@ -8,7 +8,7 @@ testing = 1
|
||||
# Import the libraries we will use
|
||||
#from mega import Mega
|
||||
import tracemalloc
|
||||
from concurrent.futures import ProcessPoolExecutor
|
||||
#from concurrent.futures import ProcessPoolExecutor
|
||||
from datetime import datetime
|
||||
from gtts import gTTS
|
||||
import discord
|
||||
@ -17,7 +17,8 @@ import re
|
||||
import sys
|
||||
import random
|
||||
import os
|
||||
import asyncio, threading
|
||||
import asyncio
|
||||
from threading import Thread
|
||||
import ffmpeg
|
||||
#import talkey
|
||||
|
||||
@ -110,7 +111,8 @@ async def madlibsLoop():
|
||||
voice.stop()
|
||||
print("Attempting to play audio"+'\n')
|
||||
voice.play(discord.FFmpegPCMAudio("currentTTS.wav"))
|
||||
message = await self.bot.wait_for('message', check=lambda messages: message.author.id == ctx.author.id and ctx.channel.id == message == ctx.message.id, timeout=30.0)
|
||||
message = await client.wait_for('message')
|
||||
# , check=lambda messages: message.author.id == ctx.author.id and ctx.channel.id == message == ctx.message.id, timeout=30.0
|
||||
replaceVar = message.content
|
||||
print("You gave me: "+replaceVar)
|
||||
replaceList.append(replaceVar)
|
||||
@ -194,24 +196,6 @@ async def madlibsLoop():
|
||||
else:
|
||||
discordFile = discord.File(saveFile+'.wav', filename=saveFile+'.wav')
|
||||
await channel.send(file=discordFile)
|
||||
|
||||
async def messageListening():
|
||||
global messageslist, messageAuthorList, logMessages
|
||||
print("Now Listening for messages...")
|
||||
messagesList= []
|
||||
messageAuthorList = []
|
||||
print("Loop start!")
|
||||
x = 0
|
||||
while True:
|
||||
async def on_message(message):
|
||||
raw_message = await client.wait_for('message')
|
||||
if logMessages == True:
|
||||
print("Loop Count: "+str(x))
|
||||
messagesList.append(raw_message.content)
|
||||
messageAuthorList.append(raw_message.author.nick)
|
||||
if logMessages == True:
|
||||
print("Message from "+messageAuthorList[x]+": "+messagesList[x])
|
||||
x += 1
|
||||
#await client.process_commands(message)
|
||||
#Setup Discord functions and announce on discord that we are ready
|
||||
|
||||
@ -229,10 +213,12 @@ class MyClient(discord.Client):
|
||||
|
||||
async def on_message(self, message, pass_context=True):
|
||||
if message.content == 'mad!madlibs':
|
||||
print("lol")
|
||||
channel = client.get_channel(656233549837631508)
|
||||
await madlibsLoop()
|
||||
await channel.send("Done!")
|
||||
#Turn on message logging
|
||||
"""
|
||||
async def on_message(self, message, pass_context=True):
|
||||
if message.content == 'mad!logMessagesOn':
|
||||
pass
|
||||
@ -256,11 +242,32 @@ class MyClient(discord.Client):
|
||||
else:
|
||||
channel = client.get_channel(656233549837631508)
|
||||
await channel.send("You are not authorized to use this command! Only @CCF_100#1050 may use this command!")
|
||||
"""
|
||||
#Calls message listening function.
|
||||
logMessages = False
|
||||
loop = asyncio.get_event_loop()
|
||||
asyncio.create_task(messageListening())
|
||||
print("lol3214")
|
||||
#logMessages = False
|
||||
#async def messageListening():
|
||||
#global messageslist, messageAuthorList, logMessages
|
||||
#print("Now Listening for messages...")
|
||||
#messagesList= []
|
||||
#messageAuthorList = []
|
||||
#print("Loop start!")
|
||||
#x = 0
|
||||
#while True:
|
||||
#async def on_message(message):
|
||||
#raw_message = await client.wait_for('message')
|
||||
#if logMessages == True:
|
||||
#print("Loop Count: "+str(x))
|
||||
#messagesList.append(raw_message.content)
|
||||
#messageAuthorList.append(raw_message.author.nick)
|
||||
#if logMessages == True:
|
||||
#print("Message from "+messageAuthorList[x]+": "+messagesList[x])
|
||||
#x += 1
|
||||
#Start messageListening in a new thread to prevent it from stalling the rest of the script
|
||||
#def startMessageListening():
|
||||
#asyncio.set_event_loop(loop)
|
||||
#loop.run_forever() new_loop = asyncio.new_event_loop()
|
||||
#t = Thread(target=startMessageListening, args=(new_loop,))
|
||||
#t.start()
|
||||
#Disconnect Voice
|
||||
#await asyncio.sleep(60)
|
||||
#voiceChannel = client.get_channel(682688245964079127)
|
||||
|
12
DiscordBot/stories.txt
Normal file
12
DiscordBot/stories.txt
Normal file
@ -0,0 +1,12 @@
|
||||
<MadLib Gameshow>
|
||||
<verb> on down! You're the next contestant on <celebrity>'s new gameshow, MadLib! Here's how it works. You will <verb> over a <noun> at a rate of <number> mph. After you jump over that item, you will <verb> over to the <adjective> <noun> and press the <noun> at the end. <adjective> time wins! Oh. I forgot to introduce our host. He's a <adjective> person who can't wait to <verb> in to the show. Please welcome, <proper name>! Alright players, on your mark. Get set. <silly word>! Alright, here goes <boy's name> on the first stage of the competition. And.. WOAH! He just <verb ending in ed> over the thing! That's gonna hurt him tommorow. But it'll be all worth it after he wins the grand prize of <number> dollars! Which he says will go towards <item you find at a store>. Very <adjective> investment, but it's his money! Here he comes around the second leg. AND WOAH, AGAIN HE LOOKS <adjective> ON NETWORK TELEVISION! This is what primetime is all about here on the network of <tv network>. And, he presses it! He finishes with a time of <time>. Will that be enough to win? Find out on <day of week> when <girl's name> will challenge him for the grand prize. For all of us here at MadLib, good night everyone!
|
||||
<Three Little Pigs>
|
||||
Once upon a time, there were three <adjective> pigs. One day, their mother said, "You are all grown up and must <verb> on your own." So they left to <verb> their houses. The first little pig wanted only to <verb> all day and quickly built his house out of <plural noun>. The second little pig wanted to <verb> and <verb> all day so he <past tense verb> his house with <plural noun>. The third <adjective> pig knew the wolf lived nearby and worked hard to <verb> his house out of <plural noun>. One day, the wolf knocked on the first pig's <noun>. "Let me in or I'll <verb> your house down!" The pig didn't, so the wolf <past tense verb> down the <noun>. The wolf knocked on the second pig's <noun>. "Let me in or I'll blow your <noun> down!" The pig didn't, so the wolf <past tense verb> down the house. Then the wolf knocked on the third <adjective> pig's door. "Let me in or I'll blow your house down!" The little pig didn't, so the wolf <past tense verb> and <past tense verb>.He could not blow the house down. All the pigs went to live in the <noun> house and they all <past tense verb> happily ever after.
|
||||
<AMC Cinemas Pre-Show Policy>
|
||||
Thank you for choosing AMC Cinemas. Where we make movie moments AMC <adjective ending in ing>. Your safety is <adjective> to us, so remember, keep a <body part> on your valuables. Be sure to report any <adjective> behavior. And please take a moment to find any emergency exits near you. Make sure to stock up on <soda brand> and <food> at the concessions bar. Enjoy your movie, <movie title> and we thank you for choosing AMC Cinemas as your destination to watch that movie. Please, silence your <device> now and be quiet and courteous of your peers. And now, ladies and gentlemen, here are some special previews coming to an AMC near you.
|
||||
<NFL on What Channel?!>
|
||||
The NFL is back! On our new home! Welcome to the most in-depth pregame show in all of pregame shows. This is the NFL on <tv network> brought to you by <food brand>! Hang tight and we'll be right back! Scene 2: Welcome in to Sunday on <same tv network>! My name is <celebrity>, and I am sitting alongside four celebrities, <celebrity>, <celebrity>, <celebrity>, and <celebrity>. Welcome guys. Week <number> is looking promising as we have three key games to focus on. First off, the <nfl team> take on the <nfl team>, our afternoon game, the <nfl team> vs the <nfl team>. Finally, our primetime game, the <nfl team> vs the <nfl team>. A lot of action today, and we will break that down soon in the <amount of time> coming. Before we do anything, let's take a live look inside <stadium> where the first key match will be playred, and we have our field reporter, <celebrity> who is covering our action. Scene 3: Alright, thank you. Now, it's time for kickoff of our first key game. We hope you enjoy the game and we will <verb> you at halftime.
|
||||
<Awards Show>
|
||||
Welcome everyone to <famous city> and the <year> MadLib awards show. Here are the nominees for <random award show category>. First, <former president>. Next, <actor/actress>. And finally, <random silly name>. And the winner is... <one of the names you put>! <winner> could not be here tonight so he recorded a message for us to see. Take a look. Winner: Hello all. Thank you, the fans, for voting. I really appreciate it. I am sorry I couldn't be there.
|
||||
<caleb wanted me to do a thing now it will commence>
|
||||
Once upon a time in the land of <city>, there was a lovely little chap called <name>, but everyone just <verb ending in ed> to call him <silly word>. You see, he was the hero of the nearby city of <another city>, and that made the mayor of the city he lived in, <celebrity>, very unhappy. So, in an act of <noun>, he created his own <noun> army to take over the world. Now <same silly word> did not like this, so he <verb ending in ed> up to the main robot, which the mayor was in, and told him "<phrase>". The mayor, hearing those words, instantly surrendered and <verb>. He was then charged for 3 major acts of <noun>.
|
1
DiscordBot/storyCount.txt
Normal file
1
DiscordBot/storyCount.txt
Normal file
@ -0,0 +1 @@
|
||||
6
|
Loading…
Reference in New Issue
Block a user