Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion src/commands/beginner.cpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,39 @@
#include "commands.h"
#include "../globals/globals.h"

#include <string>

void cmd::beginnerCommand(dpp::cluster& bot, const dpp::slashcommand_t& event)
{
const std::string content = R"(If you're learning C++, this learning path can help you get started:

**Suggested order**
1. Install a compiler and choose an IDE
2. Learn variables, types, conditions, and loops
3. Learn functions and basic program structure
4. Learn classes, structs, and object-oriented programming
5. Learn the standard library, including strings, vectors, and maps
6. Practice by building small projects and debugging your code

**Recommended resources**
📘 **Learn C++**
https://www.learncpp.com/

📖 **C++ Reference**
https://en.cppreference.com/

**Common advice**
✅ Learn modern C++, rather than treating it as C with classes
✅ Prefer resources that explain why code works
✅ Read and write code regularly
❌ Do not rely on AI to write your code for you

If you're stuck, ask in the help channels: <#1130494190615265342>.
Include your code, error messages, what you tried, and what you expected to happen.)";

const dpp::embed embed = dpp::embed()
.set_color(globals::color::defaultColor)
.add_field("👋 New to C++? Start here!", "If you're learning C++, we recommend these resources:\n\n📘 **Learn C++ (Best beginner tutorial)**\n- https://www.learncpp.com/\n\n📖 **CPP Reference (Language & Standard library reference)**\n- https://en.cppreference.com/\n\n🛠️ **Practice**\n1. Build small projects\n2. Read and write lots of code\n\n**Common advice:**\n* ✅ Learn modern C++, not C with classes\n* ✅ Avoid outdated books, videos, and random blog posts that teach old C++ practices\n* ❌ Don't ask ChatGPT or other AI to write your code\n\nIf you're stuck on something specific, ask in the help channels: <#1130494190615265342>.\nBe sure to include your code, any error messages, what you've tried already, and what you expected to happen.");
.add_field("👋 New to C++? Start here!", content);

const dpp::message message(event.command.channel_id, embed);
event.reply(message);
Expand Down