#SERVER WON'T START: ModuleNotFoundError: No module named 'discord_slash'
1 messages ยท Page 1 of 1 (latest)
if someone with coding experience could DM me I'll walk you through what I've done and show you the code for the bot and everything.
thanks so much <3
Why it's not letting you post code?
Use sourcebin for it
You could use mcpasteio
you probably haven't placed package.json file
or some dependencies are missing in your package.json file
How to use MCPaste to share configuration files, console log and more!
They said they're using python so I doubt it's package.json
o well, didn't see that
i was going to say, why use additional packages like discord_slash when you can just use a complete slash command built in library like discord.py (the new version) or py-cord?
most of these additional slash/interaction packages are no longer nessecary, and most of them not updated anymore
Thanks for all the replies!
Ok so Iโll be completely frank - I have ZERO idea what Iโm doing ๐
I purchased the annual host and used chatGPT to make the bot. Iโve gone into a few other servers and found that the info chatGPT is using is outdated so Iโve kind of been doing trial and error as well as reading through a few posts on GitHub to try and figure it all out.
Iโll post what I have via sourcebin once I get back to my PC, I just took a bit of a break because I was getting frustrated ๐ฅฒ
@bleak harbor, you just advanced to level 1 !
ok so, if you are going to start from zero knowledge and want to make a discord bot, chatGpt is not the way to dit. Chatgpt can be very helpful, but only if you know what you are doing, and what part of chatgpt is not telling the truth. First, you need to learn basic python, and that can take months of hard work, depending on how much you want to be familiar with it. Second, you need to learn how to use the libraries like discord.py or pycord. That is something you get better with as you work with them, so you can get your first bot done in close to a week. But, you need to have a firm grip on python3, because these libraries are not friendly to python beginners, as they immediatly use decorators and such advanced topics
of course, your other choice is to just grab an existing bot off github or hire somebody to make you the bot
I am about to hire someone ngl
know anyone? ๐
honestly no
its hard to find good devs who 1 won't scam you and 2 would make a good bot for you
what are you trying to make anyways
good devs are hard to come by fr
I am trying to make a discord bot that will record scores for members, tally them up, and create a leaderboard. I'd like a few variables added to the slash command so that an admin can record the member who scored, what they scored on, and the score itself. I am having a hard time figuring out how to create the options for the command. I can do a '!' or whatever command with the <variables> written out but I find it much more pleasing to have a /command with each field entered in correctly.
that looks like something you can find on github
i mean, like if you mean socre = message count/activity
looked at it for the first time - while actually trying to write it - today.
I've read a lot of it though
I just haven't written it
some things are more easily understood than others, and I'll admit that when you have a dev in your ear explaining everything, it makes a lot more sense.
can I DM you @dense basin ? Is that ok?
dm me what?
the link with what I'm looking at
@bleak harbor I can help you with building a gpt bot
any dev can tell you what to do
and see if you can help me make sense of it ๐
but in the end it is just spoonfeeding
hey let's avoid taking stuff to dms if possible
i can see deleted links
so just send them i'll take a look anyways
I don't know what a gpt bot is ๐ฅฒ
ok so that first one that was deleted
You are building that?
@bleak harbor posted:
curretly reading this ๐ https://github.com/Rapptz/discord.py/blob/master/examples/app_commands/basic.py
@bleak harbor posted:
https://github.com/Rapptz/discord.py/blob/master/examples/app_commands/basic.py
Do you know basics of python and discord.py?
they don't that's the problem
now i am more familiar with slash commands in py-cord
but i can offer some suggestions anyways
ok so let me show you what I have so far
@bleak harbor, you just advanced to level 2 !
idk how to use either tbh
learning curve for new people
python is the beginner language
js is powerful, but it is probably the most slandered language in cs, and also more complex than python
if i had to say, start with python
honestly I started off with python but it got me bored so I switched to js and js is a lot better
you can't get bored of python :D
not helpful 
I don't know what I'm doing ๐ญ
i never learned js myself fully, and i prob won't ever
not overall, but when working on discord bot in python
but once you know one language the rest of them come mostly hand in hand
I suggest you try to learn basic cs and python first
stuff like
I am not saying python is bad language but I don't see it good for discord bots
variables, functions, for-loops, etc
no python is popular for discord bots
I took a few classes of cs on freecoding-whatever
there is no reason why js is better other than preference
it was a while ago though
js is too, isn't it?
discord.js is more powerful than discord.py
ok that's cuz discord.py is discounted
countinuedi meant
but you have pycord and tons of forks
have you used nextcord?
no
i use pycord mainly nowdays
no real reason why
than i learned it
back in the day when discord.py had no slash commands
i thought nextcord was better after discord.py
anyways, so if u need some help with the code just send it
idk forks of discord.py is a whole iceberg like forks of bukkit
@dense basin, you just advanced to level 43 !
also use sourcebin instead of mcpaste 
idk what that site was
ah dang
why didn't that show up
here
just use mcpaste
A easy to use Paste site for Minecraft Server logs.
its for minecraft srrver logs ๐ญsourcebin better
there isno difference
@bleak harbor Please use sourcebin, it's a lot better for code
it literally formats the code
look, mcpaste is a known website that won't get flagged by the bot
and that kind of arguement doensn't help right now
ahh
I'm pretty sure you just need to see the code, which is what you have . . . no?
I did
so i have no idea what the whole discord.py command tree garbage is
because I use pycord and pycord is more clean in my opinon
but the code looks ok
this is my error -
23.01 23:34:08 [Bot] Traceback (most recent call last):
23.01 23:34:08 [Bot] File "/bot.py", line 7, in <module>
23.01 23:34:08 [Bot] class TributeCog(Cog):
23.01 23:34:08 [Bot] File "/bot.py", line 13, in TributeCog
23.01 23:34:08 [Bot] @commands.describe("Record a tribute")
23.01 23:34:08 [Bot] AttributeError: module 'discord.ext.commands' has no attribute 'describe'
ok but
yea
you see
discord.py slash command garbage
its a bag load of unessecary crap for slash commands
i cannot help you with that because I don't use or like discord.py
I think you have to install python modules using pip, right?
i use pycord which i just discord.py but with a different slash command system
they already did
but i'm 99% chatgpt was coming up with some bogus decorator
could you rewrite it in pycord?
But it's not recognizing it
it's like pulling teeth
this will not help you
i can't rewrite it in pycord
but ican tell you how to
it won't tbh, but it will help me better help with the code
unless, you know discord.py's slash command crap and want to fix it
uh no
I just want slash commands, I don't really care how it's written or in what language
But how will you work on it, if you don't know what it is?
let me help you with pycord
I am just trying to figure it out. I have a basic knowledge of coding, not very much but enough to semi understand things
so first, uninstall discord.py and install py-cord
then, change your code
import discord
intents = discord.Intents.default()
intents.message_content = True
bot = commands.Bot(command_prefix='!', intents=intents)
ok, I am literally just going to enter it into chatGPT though ๐
idk what I'm doing at all
start off with this, and ofc the bot.run("token") at the end
don't
i already told you
chatgpt is not good for making entire code for you
nitro is literally spoonfeeding you
just do what he says
how am I supposed to change my code ๐ฅฒ
replace it all
ok
first, you need to change our your packages thou
remove discord.py and add py-cord
the dash is important
ok so I just deleted everything
added this to vscode
done
what do I do after this?
@bleak harbor, you just advanced to level 3 !
add some slash commands
i belive it is
@bot.slash_command(description="give it a description")
async def commandName(ctx):
await ctx.respond("say something here")
to add paramters
from discord import Option
@bot.slash_command()
async def test(ctx, stringoption:Option(str,description="some string")
await ctx.respond(stringoption)
