I am trying to change the name of my discord server but I am unsure how to perform such action.
Here is my full code so far:
import discord import os from dotenv import load_dotenv from discord.ext import commands import asyncio from string import digits, ascii_letters load_dotenv() DISCORD_TOKEN = os.getenv("DISCORD_TOKEN") bot = commands.Bot(command_prefix="$") @bot.event async def on_ready(): print("It's ready") @bot.command() async def change(ctx): channel = 203487901092817113 ctx.message.channel.edit(name="hello") bot.run(DISCORD_TOKEN)
You need an await keyword.
await
await ctx.message.channel.edit(name="hello")
2.1m questions
2.1m answers
60 comments
57.0k users