#๐ can someone please help me with inlining
83 messages ยท Page 1 of 1 (latest)
@pastel vector
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
so
i want to do this inlined
discord
๐
the message is ina text file so idk how that would work
if anyone can help id deeply appreciate it
Even better if you can share the code that you need changing
Might help the volunteer helper a lot
If you can read this โ๏ธ
you should share the code as text
they kinda have server links in them
Where does it get displayed?
how does it get displayed from the text file?
If the code is very long, use a pastebin
!pastebin
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
I mean tbh. Those discords in the screenshot all look like scams?
99% off?
its not a scam its just over exaggeration
So, scam
no its called marketing
False marketing?
well to get people to join my server
they see things like
90-80% off
not %99
sometimes 99%
so no its not false
techincally
you made the other guy leave
congrats
To be fair, I didn't make them leave.
Perhaps when they saw that you were making some sort of spambot they became uncomfortable helping
still waiting on this to be answered โ๏ธ
still tho... no idea about this savings discord server thing...
its not a spam bot you have no idea what im making
๐ญ
its just a titkok bot
You said yourself that you were advertising.
generates random bio's
for users of my server to use for their tiktok accounts
not harming anyone or breaking tos
stop being odd man
im trynna just chill
and get help
i dont understand that question fully
How does the "bios text" get there?
oh
Not seeing a single code out of this
bro
Read this โ๏ธ
He tried. The bot detected his spam servers and deleted it
@misty kayak
Lol
wonderful... its just initial_bios... fantastic
So it โจ magically โจ shows up on Discord
is that a bad thing
I still have no idea how it goes into your tiktok bot
is that gonna help you figure out how i can make it do this
how can we know? I've never seen it yet
what do you want to see exactly
code
finally
So its basically this
# Define the slash command for bios
@client.tree.command(name='get_bio', description='Get a random TikTok bio')
async def get_bio(interaction: discord.Interaction):
print("get_bio command invoked") # Debugging statement
user_id = interaction.user.id
user_claim_count = user_claims.get(str(user_id), 0)
if user_claim_count >= 2:
await interaction.response.send_message("You have already claimed the maximum of 2 bios.", ephemeral=True)
return
bios = load_bios()
if not bios:
await interaction.response.send_message("No more bios available.", ephemeral=True)
return
# Select a random bio
selected_bio = random.choice(bios)
print(f"Selected bio: {selected_bio}") # Debugging statement
# Create a view with buttons for claiming or regenerating
view = BioView(selected_bio, user_id)
# Send the bio with buttons
await interaction.response.send_message(f'Random Bio: {selected_bio}', view=view, ephemeral=True)
Bios are loaded from this
def load_bios():
"""Load bios from the text file."""
with open(BIOS_FILE, "r") as f:
bios = [line.strip() for line in f.readlines()]
return bios
Im still looking
ok
I'm not that experienced in discord bot dev but it looks like if you want to send in multilines like
discord.gg
๐
You would have to send_message twice.
One for each line like:
await interaction.response.send_message(f'Random Bio: First line {selected_bio}', ephemeral=True)
await interaction.response.send_message(f'Random Bio: Second line {selected_bio}', ephemeral=True)
Maybe if you split it on \n, then that would work
My guess is that that's the limitation on the discord ui View
This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.