0 votes
ago by
Seriously, every time I ask it to write a full script for a Discord bot or a web scraper, it gets about 50 lines in and then just stops or says 'continue the rest yourself'. Even if I say 'don't skip any code' it still does it. Is there a specific prompt or a system instruction you guys use to make it actually finish the script in one go?

1 Answer

0 votes
ago by

Ugh, I totally get it. Here’s what works for me!

Oh man, I’ve been through this exact same thing so many times. It feels like as soon as the script gets actually useful, ChatGPT just checks out and leaves you with those annoying # ... rest of your code here comments. It’s definitely a "lazy" behavior built-in to save on processing power, but it's super frustrating when you're trying to build something like a Discord bot or a complex scraper.

After a lot of trial and error, I've found a few tricks that actually force it to finish the job. Here is what I usually do:

1. Use the "Modular" approach
Instead of asking for the entire script in one go, I’ve started asking it to break the script into specific sections or functions. For example, if I'm making a Discord bot, I'll say: "Write the initial setup and the first three command functions. Stop there." Once it finishes, I'll say: "Now write the next three commands and the error handling." It feels like more work, but it actually ends up saving time because you don't have to keep re-prompting it to fix the cut-off code.

2. Be extremely specific in your prompt
Simply saying "don't skip code" doesn't always work because the AI is programmed to be concise. Try adding this exact phrase to your prompt:

  • "Write the complete, production-ready code. Do not use any placeholders, do not skip any logic, and do not use comments to represent missing sections. I need the full, executable script in a single code block."

3. The "Continue" button vs. Typing "Continue"
When it does cut off, don't just type "continue" in the chat box. Usually, there is a built-in "Continue generating" button that pops up at the bottom of the chat. Using that button is much better because it tells the AI to pick up exactly where it left off mid-sentence. If you just type "continue," it often tries to restart or summarizes what it already did, which is a total mess.

4. Ask for a "Dry Run" outline first
Sometimes I ask it to give me a high-level outline of the script structure first (just the function names and the logic flow). Once we both agree on the structure, I tell it: "Okay, now write the full code for Section 1 and Section 2." Breaking it up based on that outline keeps the AI focused and prevents it from hitting that output limit where it starts getting lazy.

5. Switch to a "Coding Assistant" persona
I’ve noticed that if I start the conversation by saying, "You are a Senior Python Developer who provides full, unabridged source code for every request," it tends to be a bit more thorough. It's like you have to remind it what its job is!

Give those a shot! Honestly, the modular approach (Point #1) is the most reliable way to handle long Python projects without losing your mind. Good luck with the bot!