#SERVER WON'T START: ModuleNotFoundError: No module named 'discord_slash'

1 messages ยท Page 1 of 1 (latest)

bleak harbor
#

it wont let me post the code for the bot . . .

#

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

still breach
still breach
#

you probably haven't placed package.json file

#

or some dependencies are missing in your package.json file

split fractalBOT
graceful zephyr
still breach
dense basin
#

most of these additional slash/interaction packages are no longer nessecary, and most of them not updated anymore

bleak harbor
#

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 ๐Ÿฅฒ

vast wharfBOT
#

@bleak harbor, you just advanced to level 1 !

dense basin
# bleak harbor Thanks for all the replies! Ok so Iโ€™ll be completely frank - I have ZERO idea ...

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

bleak harbor
#

know anyone? ๐Ÿ˜…

dense basin
#

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

bleak harbor
#

good devs are hard to come by fr

bleak harbor
# dense basin what are you trying to make anyways

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.

dense basin
#

i mean, like if you mean socre = message count/activity

bleak harbor
#

I wouldn't even know where to start

#

I also can't post links here

dense basin
#

i saw that

#

but

#

how familiar are you with python

bleak harbor
#

๐Ÿ™ƒ

#

I can understand very little

dense basin
#

from 0 what is python to 10 i can do tensorflow

#

i'm prob like 8

bleak harbor
#

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?

dense basin
bleak harbor
#

the link with what I'm looking at

still breach
#

@bleak harbor I can help you with building a gpt bot

dense basin
bleak harbor
#

and see if you can help me make sense of it ๐Ÿ˜…

dense basin
#

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

bleak harbor
#

ok so that first one that was deleted

still breach
split fractalBOT
bleak harbor
#

woah heh

#

that's cool

still breach
dense basin
#

nah that was just me

#

manualy work ๐Ÿ™ƒ

dense basin
#

now i am more familiar with slash commands in py-cord

#

but i can offer some suggestions anyways

still breach
#

just use js lol

#

js is W

bleak harbor
#

ok so let me show you what I have so far

vast wharfBOT
#

@bleak harbor, you just advanced to level 2 !

bleak harbor
#

idk how to use either tbh

dense basin
#

python is the beginner language

#

js is powerful, but it is probably the most slandered language in cs, and also more complex than python

dense basin
still breach
#

honestly I started off with python but it got me bored so I switched to js and js is a lot better

dense basin
#

you can't get bored of python :D

bleak harbor
#

I don't know what I'm doing ๐Ÿ˜ญ

dense basin
#

i never learned js myself fully, and i prob won't ever

still breach
#

not overall, but when working on discord bot in python

dense basin
#

but once you know one language the rest of them come mostly hand in hand

dense basin
#

stuff like

still breach
#

I am not saying python is bad language but I don't see it good for discord bots

dense basin
#

variables, functions, for-loops, etc

dense basin
bleak harbor
dense basin
#

there is no reason why js is better other than preference

bleak harbor
#

it was a while ago though

still breach
#

js is too, isn't it?
discord.js is more powerful than discord.py

dense basin
#

countinuedi meant

#

but you have pycord and tons of forks

still breach
#

have you used nextcord?

dense basin
#

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

still breach
dense basin
dense basin
vast wharfBOT
#

@dense basin, you just advanced to level 43 !

still breach
#

also use sourcebin instead of mcpaste bob

bleak harbor
#

idk what that site was

dense basin
#

ah dang

#

why didn't that show up

#

here

#

just use mcpaste

bleak harbor
#

then what

still breach
dense basin
still breach
#

@bleak harbor Please use sourcebin, it's a lot better for code

still breach
dense basin
#

look, mcpaste is a known website that won't get flagged by the bot

#

and that kind of arguement doensn't help right now

still breach
#

ahh

bleak harbor
#

I'm pretty sure you just need to see the code, which is what you have . . . no?

dense basin
#

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

bleak harbor
#

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'

dense basin
#

ok but

#

yea

#

you see

#

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

still breach
#

I think you have to install python modules using pip, right?

dense basin
#

i use pycord which i just discord.py but with a different slash command system

dense basin
dense basin
bleak harbor
still breach
#

But it's not recognizing it

bleak harbor
still breach
dense basin
#

but ican tell you how to

dense basin
#

unless, you know discord.py's slash command crap and want to fix it

still breach
#

you can also use gpt for it

#

#ai-support

dense basin
#

uh no

bleak harbor
#

I just want slash commands, I don't really care how it's written or in what language

dense basin
#

ask chagpt to write code is really bad

#

for beginners

bleak harbor
#

that's how I got here in the first place

#

I can do that on my own

still breach
dense basin
#

let me help you with pycord

bleak harbor
#

I am just trying to figure it out. I have a basic knowledge of coding, not very much but enough to semi understand things

dense basin
#

then, change your code

#
import discord

intents = discord.Intents.default()
intents.message_content = True

bot = commands.Bot(command_prefix='!', intents=intents)
bleak harbor
#

ok, I am literally just going to enter it into chatGPT though ๐Ÿ˜…

#

idk what I'm doing at all

dense basin
#

start off with this, and ofc the bot.run("token") at the end

dense basin
#

i already told you

#

chatgpt is not good for making entire code for you

still breach
dense basin
#

plus it barely knows what pycord is

#

trying not to xd

still breach
#

just do what he says

bleak harbor
dense basin
bleak harbor
#

ok

dense basin
#

first, you need to change our your packages thou

#

the dash is important

bleak harbor
#

ok so I just deleted everything

dense basin
#

go replace your requirements/packages

#

delete discord.py and add py-cord

bleak harbor
#

done

vast wharfBOT
#

@bleak harbor, you just advanced to level 3 !

dense basin
#

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)
bleak harbor
#

ok it's too late for me to dive into something new I think lol

#

I've been working on this for nearly 12 hours straight with no luck.