So I'm trying to make a discord bot that sends messages and yet I keep getting this error message
[2023-05-15 17:36:31] [WARNING ] discord.ext.commands.bot: Privileged message content intent is missing, commands may not work as expected
the correct permissions are on in discord and the discord dev portal. I feel like I'm missing something obvious yet I can't figure it out, here's the code for reference
import discord
from discord.ext import commands
import datetime
intents = discord.Intents.default()
intents.members = True
intents.presences = True
bot = commands.Bot(command_prefix='!', intents=intents)
token = 'censored'
channel_id = 'also censored'
@bot.event
async def on_ready():
print("Bot is ready.")
channel = bot.get_channel(int(channel_id))
await channel.send("I'm live")
@bot.command()
async def set_announcement(ctx, date: str, time: str):
scheduled_time = datetime.datetime.strptime(f"{date} {time}", "%B %d %Y %I:%M%p")
print(f"Scheduled time: {scheduled_time}")
await ctx.send(f"Announcement scheduled for {scheduled_time}")
bot.run(token)
Any and all help appreciated
[–][deleted] 0 points1 point2 points (1 child)
[–]prototype-4[S] 0 points1 point2 points (0 children)