#why does my clean command not work
1 messages · Page 1 of 1 (latest)
define "not working". Do you get an exception?
As of September 1st 2022, Discord started requiring message content intent for bots that want to read message content. This is a privileged intent!
If your bot has under 100 guilds, all you have to do is flip the switch in the developer dashboard. (over at https://discord.com/developers/applications, also see the image)
If your bot has over 100 guilds, you'll need approval from Discord's end.
Even though you can just use this to get away with it, it is recommended by Discord to use Slash Commands whenever possible, so look into that if you can (Slash Commands Documentation)
perhaps try adding intents if you're on v4.3.0
i started now complet new i got a rage XD
so i using now
https://www.youtube.com/watch?v=7-tyLCAO4mY&list=PLS6sInD7ThM0Zb8F_KBl4T_jGF1e3apsc&ab_channel=DapperDino
but now i get this error i dident even start XD
Just Here To Plug My Social Media Stuff:
https://www.patreon.com/dapperdino
https://www.twitch.tv/dapper_dino
https://twitter.com/dapperdino4
https://github.com/DapperDino
https://discord.gg/sn9xXK4
pretty sure that tutorial is deprecated
bruh do u have a better one PLEASE ♥
by itself i want a bot of the
autochannel (temporary channel)
autorole
also i want to include the riot API
slashcommands:
clean,
reactrole,
and some other things
i know its much for somone that doesent even know how to code but iknow i can do that XD if i want
psst
@red summit i think i know why it's not working
can you send me the code
not the ss
oh okey
using DSharpPlus;
using DSharpPlus.CommandsNext;
using DSharpPlus.EventArgs;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using System;
using System.Net.Http.Headers;
using System.Text;namespace GameoverBot
{
public class Bot
{
public DiscordClient Client { get; private set; }public CommandsNextExtension Commands { get; private set; } public async Task RunAsync() { var json = string.Empty; using(var fs = File.OpenRead("config.json")) using(var sr = new StreamReader(fs, new UTF8Encoding(false))) json = await sr.ReadToEndAsync().ConfigureAwait(false); var configJason = JsonConvert.DeserializeObject<ConfigJson>(json); var config = new DiscordConfiguration { Token = configJason.Token, TokenType = TokenType.Bot, AutoReconnect = true, LogLevel = LogLevel.Debug, UseInternalLogHandler = true }; Client = new DiscordClient(config); Client.Ready += OnClientReady; var commandsConfig = new CommandsNextConfiguration { }; Commands = Client.UseCommandsNext(commandsConfig); await Client.ConnectAsync(); await Task.Delay(1); } private Task OnClientReady(DiscordClient client, ReadyEventArgs e) { return null; } }}
Docs website has not been updated yet for slash commands. For that part, see here instead: https://github.com/DSharpPlus/DSharpPlus/blob/master/docs/articles/slash_commands.md
When will the docs website get an update? There's a lot things missing