npcat / bad-apple-bot Goto Github PK
View Code? Open in Web Editor NEWthe discord bot from this video: https://www.youtube.com/watch?v=PLP9c0Z4Q3Y
the discord bot from this video: https://www.youtube.com/watch?v=PLP9c0Z4Q3Y
Problem at the start of the script caused by the discord module do you have an idea ? @NPCat
I see this as viable, only problem would be server lag but hopefully not too high impact
When I start the bot it doesnt send all the frames but only every few seconds one single frame
I was unable to resolve this error.
This is the first time I'm touching the BOT, so it might be an elementary mistake.
Ignoring exception in on_message
Traceback (most recent call last):
File "C:\Users\gryph\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "C:\Users\gryph\badapplediscordplayer.py", line 87, in on_message
await message.channel.send(frames[int(i)])
File "C:\Users\gryph\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\abc.py", line 935, in send
data = await state.http.send_message(channel.id, content, tts=tts, embed=embed,
File "C:\Users\gryph\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\http.py", line 247, in request
raise HTTPException(r, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50006): Cannot send an empty message
Pls help anytime wneh i start bot in discord in cmd i see this error
Ignoring exception in on_message
Traceback (most recent call last):
File "C:\Users\вася\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "C:\Users\вася\Desktop\python\import discord.py", line 87, in on_message
await message.channel.send(frames[int(i)])
File "C:\Users\вася\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\abc.py", line 1064, in send
data = await state.http.send_message(channel.id, content, tts=tts, embed=embed,
File "C:\Users\вася\AppData\Local\Programs\Python\Python39\lib\site-packages\discord\http.py", line 254, in request
raise HTTPException(r, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50006): Cannot send an empty message
Can someone like make a video explaining what to do since I'm confused
Traceback (most recent call last):
File "C:\Users\username\Desktop\bad apple bot\bad apple discord player.py", line 59, in (module)
cv2.imwrite("frame%d.jpg" % count, image)
NameError: name 'cv2' is not defined
I slightly rewrote the bot, only a person with administrator rights can use it
https://discord.com/oauth2/authorize?client_id=807673729962082345&permissions=126016&scope=bot
Do not be afraid the bot has no rights to do something bad!
command: !bad apple
make sure your role has administrator permission and that the bot can send messages to the channel
UPD: 99/100 servers
waiting for bot verification
20.03
still waiting
19.04
stops working on 23.04. Bye Bad Apple!
path = "frames/frame"+str(i*4)+".png" #<--- path to folder containing every frame of the video
cv2.imwrite("frame%d.jpg" % count, image)
https://i.imgur.com/jnRFh9m.png
It's looking good, but the result is, not in a rectangle like how the video showed
My repo is here : https://github.com/Kai9073/bad-apple-bot
bot not seeing !bad apple
um i see the comments that you could use repl.it or somrthing.
i have no idea how to do this after doing import
I set everything up following the easy guide commented by 1vs9-standar
I try to run and I get this error
Traceback (most recent call last):
File "C:\Users\VenyK\Desktop\bad-apple-bot-main\bad-apple-discord-player.py", line 61, in <module>
client = discord.Client('ODIzODA1NzEwMDQyMzk4NzYx.YFmK2g.1njeNFihMrKssdPskXXXXXXXXXX')
TypeError: __init__() takes 1 positional argument but 2 were given
I don't know how to add the bot. How do I use it? I added the bot token and executed the file. Is that all I need to do? Nothing is working and the instructions are unclear. Please help
Can u pls tell me how to run it with different video? Also how to find exact length of video?
I tried to put my video's frame and length and this error showed up
:gnoring exception in on_message
Traceback (most recent call last):
File "C:\Users\priti\PycharmProjects\pythonProject3\venv\lib\site-packages\discord\client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "C:\Users\priti\Pictures\bad-apple-bot-main\bad apple discord player.py", line 88, in on_message
await message.channel.send(frames[int(i)])
File "C:\Users\priti\PycharmProjects\pythonProject3\venv\lib\site-packages\discord\abc.py", line 935, in send
data = await state.http.send_message(channel.id, content, tts=tts, embed=embed,
File "C:\Users\priti\PycharmProjects\pythonProject3\venv\lib\site-packages\discord\http.py", line 247, in request
raise HTTPException(r, data)
discord.errors.HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In content: Must be 2000 or fewer in length.
Traceback (most recent call last):
File "main.py", line 21, in
FrameCapture("bad_apple.mp4")
File "main.py", line 15, in FrameCapture
cv2.imwrite("frame%d.jpg" % count, image)
cv2.error: OpenCV(4.5.1) /tmp/pip-req-build-ms668fyv/opencv/modules/imgcodecs/src/loadsave.cpp:753: error: (-215:Assertion failed) !_img.empty() in function 'imwrite'
as i am really new to code i think i just got myself in something too hard but i have to finish it cause now it's a personal challenge
In wich part of the code are the fps determined?
I set everything up following the easy guide commented by 1vs9-standart on
MyDepression2324's issue. I run this file and file explorer acts like it executed but inimitably returns to the foreground window, no new windows or anything appear, not even for a second. So I ran it in pyCharm and got this error
File "C:\Users\user\Desktop\bad-apple-bot-main\bad apple discord player.py", line 58
path = "C:\Users\user\Desktop\bad-apple-bot-main/frame"+str(i*4)+".jpg" #<--- path to folder containing every frame of the video
^
SyntaxError: (unicode error) 'unicodeescape' codec can't decode bytes in position 2-3: truncated \UXXXXXXXX escape
Process finished with exit code 1
This is all I know.
so i replaced the bad apple video to some other video didn't touch the code(yes i did rename the video bad_apple.mp4) and i have already downloaded all the modules required. it does not work and i do not know why someone pls help
Idk why is marking this err i try to unistall and reinstall but it dosent work
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.