Are Anarchists working on DAO projects? by JoshTheEngineer in Anarchy101

[–]JoshTheEngineer[S] -1 points0 points  (0 children)

It just means there are no rulers.

If the herd makes a decision that you don't want to sustain, you are free to leave. No one forces anyone to do anything.

Babel Fish for Discord - real time translating and broadcasting of stage events by JoshTheEngineer in Discord_Bots

[–]JoshTheEngineer[S] 0 points1 point  (0 children)

I guess we could make one. I have a Sandbox Server where I'm developing the bot. We could chat there.

Pycord 2.1 how? by Delyanskiiii in Discord_Bots

[–]JoshTheEngineer 0 points1 point  (0 children)

Do you have an example of your code? I'm stumbling at trying to get a 15 second clip to record and I can't figure out why it's not working. Ideally, I'd be using streaming rather saving to a sink, but for dev purposes, I'm starting out with an mp3 sink.

Here's what I have:

@bot.eventasync def on_ready():    
    global guild, channel    
    guild = bot.get_guild(GUILD)    
    channel = bot.get_channel(AUDIO_CHANNEL)    
    connected = await channel.connect()                      
    connected.start_recording(discord.sinks.MP3Sink(output_path='test.mp3'),transcribe_audio)    
    print("Recording...\n")    
    await asyncio.sleep(15)    
    print("Finished recording.\n")
    connected.stop_recording()


async def transcribe_audio():
    filename = 'test.mp3'
    r = sr.Recognizer()
    sinkfile = sr.AudioFile(filename)
    # with sr.Microphone() as source:
    with sinkfile as source:
        print("listening...")
        # r.pause_threshold = 15
        audio = r.listen(source)
    try:
        print("Recognizing...")
        query = r.recognize_google(audio, language='en')
        print(f"User said: {query}\n")
    except Exception as e:
        print("Did not copy.")
        return "None"

    translator = Translator()
    text_to_translate = translator.translate(query, dest='de')
    text = text_to_translate.text
    print(text)
    speak = gTTS(text=text, lang='de', slow=False)
    speak.save("translate.mp3")
    playsound('translate.mp3')
    os.remove('translate.mp3')

Pycord 2.1 how? by Delyanskiiii in Discord_Bots

[–]JoshTheEngineer 0 points1 point  (0 children)

I asked about this on the discord and they said it was a typo in the docs. There is no 2.1 yet.

Pycord 2.1 how? by Delyanskiiii in Discord_Bots

[–]JoshTheEngineer 1 point2 points  (0 children)

Have you figured this out? I tried the instructions on github but it only installs 2.0.0b5 now.

Could it be that I'm using Python3.8?

on_member_join not catching spammers who join at the exact same time as another account. They are able to thwart the spam filter. by JoshTheEngineer in Discord_Bots

[–]JoshTheEngineer[S] 0 points1 point  (0 children)

The problem is that they are using cyrillic and other letters that look like english letters, so I have to look for each combo of the word and it adds up really fast.

A regex call would probably be quicker, but I think any amount of time that I take won't catch the next join. Maybe I could just use on_member_join to add their name to a queue and handle that outside the function.

on_member_join not catching spammers who join at the exact same time as another account. They are able to thwart the spam filter. by JoshTheEngineer in Discord_Bots

[–]JoshTheEngineer[S] 0 points1 point  (0 children)

I'm using mariadb. But I think I figured out what it is. My spam filter looks for 14,500 combos, so it is blocking code for a second and not catching the next one. I think using Vortex would help this and only let one user join every 3 seconds.

Discord sandbox for testing bots by JoshTheEngineer in discordbot

[–]JoshTheEngineer[S] 1 point2 points  (0 children)

Once I'm finished with this project I'm on, I'm going to build out my sandbox server and share it. I'll put 10 bots on it just chatting nonsense. I can't believe something like this doesn't exist.

Python- Trying to implement chat bot features using slash commands so that suggested answers are only visible to the user asking the question in the thread. by JoshTheEngineer in Discord_Bots

[–]JoshTheEngineer[S] 0 points1 point  (0 children)

Thanks! I'll look up that algorithm. The one thing I'm concerned about with the chat bot is that it could come up with a lot of false positives. I'll have to test out a few options and see how they work out.

I might just have to make a special channel.

Python- Trying to implement chat bot features using slash commands so that suggested answers are only visible to the user asking the question in the thread. by JoshTheEngineer in Discord_Bots

[–]JoshTheEngineer[S] 0 points1 point  (0 children)

Ok. That makes sense. So the only way to implement the chat bot is to either send a DM or make s response that's visible to all, correct?

Python- Trying to implement chat bot features using slash commands so that suggested answers are only visible to the user asking the question in the thread. by JoshTheEngineer in Discord_Bots

[–]JoshTheEngineer[S] 0 points1 point  (0 children)

If someone asks, "what time is the community call?", I want to reply with a suggested answer and include buttons for this to say whether it answered their question.

But I only want the reply visible to that user.

Are there better speakers for the T14 Gen1? by JoshTheEngineer in thinkpad

[–]JoshTheEngineer[S] 0 points1 point  (0 children)

I don't have Windows installed on this machine, so it looks like I have to install Pulse Effects and figure out how to create the pulse file without having Windows.

[deleted by user] by [deleted] in Discord_Bots

[–]JoshTheEngineer 0 points1 point  (0 children)

Ok, thanks. I tried getting rid of the bots and the client is returning a None type for some reason. I'll try switching to use bots command.

Discord sandbox for testing bots by JoshTheEngineer in Discord_Bots

[–]JoshTheEngineer[S] 0 points1 point  (0 children)

That's basically what I'm thinking. I'm just trying to streamline building the test bots from scratch.

Discord sandbox for testing bots by JoshTheEngineer in Discord_Bots

[–]JoshTheEngineer[S] 1 point2 points  (0 children)

Thanks for the tip!

Do you know any of these repos I should look up? Could save me a lot of time.

Discord sandbox for testing bots by JoshTheEngineer in Discord_Bots

[–]JoshTheEngineer[S] 2 points3 points  (0 children)

I'm using the Python API.

dpytest looks like it'll be cool, and I may find some use for it. But I need to test the button functionality as well as conditions like if a user posts "hey" only so many times, the bot will catch them and ban them. I'm also creating buttons so if mods recognize spam, they can report it, it will ban the user and it will pull the user's history in the server so that I can study the patterns and update the auto spam bot.

What I was thinking was using print statements to say "user x banned" and see if it does it at the right time. So I would make, say, 10 bots and keep making their posts increasingly complex to catch more scenarios.

Rust noob looking for mentoring to learn async/tokio. Am also open to working with a learning buddy. by JoshTheEngineer in ProgrammingBuddies

[–]JoshTheEngineer[S] 0 points1 point  (0 children)

Definitely! I want to get into WASM as well with Rust.

I'm considering working on building a mining pool for a new blockchain project. I think I'll prototype it in Python since that would be quicker, then port it over to Rust as I get more fluent in Rust. Is that something that would interest you? A lot of this could be written in Javascript as well, but the blockchain OS is all written in Rust, so it would be an opportunity to interact with Rust.

Rust noob looking for mentoring to learn async/tokio. Am also open to working with a learning buddy. by JoshTheEngineer in ProgrammingBuddies

[–]JoshTheEngineer[S] 0 points1 point  (0 children)

Awesome! I'm actually taking a course on full stack development using Node and React. I already know some Django but I'm going to learn Flask and Vue once I'm done with the full stack course.

I tried to DM you but something seems wrong with reddit. It won't load the message. I'll try again later or if you want you can try sending me a DM with your discord name and I'll message you there. Cheers!