0

^^

Yes, this question is very, very weird. I know that IDE is not recommended / prohibited to be used in this way too, but I'm asking because I'm deeply curious :3

Here is my code:

from discord.ext import commands

import asyncio
from async_timeout import timeout

bot = commands.Bot(command_prefix = "::", description = "Hey you")

@bot.event
async def on_ready():
    await bot.change_presence(activity=discord.Activity(type=discord.ActivityType.playing, name="Hey!"))
    print("Have fun!")

async def salondethe():
    channel = bot.get_channel(123456789101112131)
    await guild.channel.send('test')    

bot.run("token")

And I would like to send salondethe() in the IDE to send a message in the channel 123456789101112131 Do you know a way? ^^ Thanks for the curious I am ^^

5
  • You want to start a bot in IDLE, and use IDLE's interactive prompt to issue commands to the bot? Commented Mar 17, 2021 at 22:57
  • Just take input and send it to the necessary channel. use this for input. Commented Mar 18, 2021 at 16:19
  • @user4815162342 exactly Commented Mar 18, 2021 at 21:24
  • @Ceres oh thanks! i'll take a look! Commented Mar 18, 2021 at 21:25
  • 1
    You question and code have nothing to do with IDLE. You should edit to remove all references to it. IDLE is a python IDE application that provides a python-specific editor and an integreted gui shell. IDLE runs user code in a separate process, so most python code, including yours, should run the same as if run directly with the same python.exe from a command line. (The main exceptions involve user interface io, as discussed in the IDLE doc.) Commented Mar 18, 2021 at 23:04

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.