bot

How do I find out the category id? (discord.py)

How to find out the id of the category by its name, for example: the category is called "Main" and it is necessary that after ... f"{OSNid}", reason=None) await ctx.guild.create_text_channel(f"TEST8", overwrites=None,category=f"{OSNid}", reason=None)

Hyperlink in the message

I tried the following code: await ctx.send("`uwu`\n\nUsage = `sun.uwu <[arg1]>`\n\nNOTE: " + ["Sunrise"]("https://disco ... d, the TypeError comes out. Please help, preferably by explaining how to add a hyperlink to a message. Solved: solution below

Discord.py deleting all messages in a text channel

I've been trying to clear messages (everything) in my Discord bot for a long time using the command: /clear, but it doesn't w ... ): await client.delete_message(msg) What am I doing wrong? I just close the file (when opened). Please help me!

How to get a list of all discord server members (discord.py)

How can I write all the server participants to a list? I tried it like this: @bot.command() async def members(ctx): for ... for member in guild.members: await ctx.send(member) But it only gave out the nickname and tag of my bot

How to remove a button from the telegram bot keyboard (Python)

I'm writing a hangman game on python.How do I make it so that after pressing a button on the keyboard,this button is automati ... return del message.text bot.send_message(message.chat.id, ''.join(n)) bot.polling()

How can I send a link in discord on behalf of a bot, but without an attachment?

When the bot sends a link to a text channel. Discord automatically creates an attachment from the site, which, with a large n ... : await ctx.send(f'{author.mention}, создаю ссылку...') url = URL_Generator() await author.send(url)

How do I create a channel on a specific discord server?

Tell me how to create a text channel on a specific server using a command on another? That is, there is a server X where the command is entered !channelcreate (channel name) (server id Y) then a text channel is created on server Y.

How to send a video via a telegram bot

How do I send a video via a telegram bot? here is a sample code, but it doesn't work elif message.text.lower() == 'example': ... KeyboardMarkup(True) keyboard.row('example') bot.send_video(message.chat.id, 'http://example.com/video.mp4')

How to check whether a user has a role for the discord bot?

How can I check if a discord user has a role? I want to make a special role so that the bot executes commands only for those ... mple, "Admin". And if there is no role, he wrote that they need such and such a role. I don't know much about Python, library

(Python bot) How do I tag people in a conversation via a bot?

I have an interesting question. I have a bot on vk (written in Python). How to make it so that it can mark the participants o ... .send", {"peer_id": id, "message": "Вот именно! Че ты ноешь?!", "random_id": random.randint(1, 2147483647)}) return "ok"

I can't perform a search query in google via javascript in tampermonkey

I am trying to implement an automatic search query in google ( or other search engines) via javascript in tampermonkey. I man ... ease help with the problem and, if possible, write the code that will execute a search query, for example, in Google. Thanks.

How do I enable the console on heroku?

Bonjour) Can I enable the console in heroku? If so, how?

Saving the user id to the database. (vk api)

You need to somehow save the value of user_id, so that you can then send a newsletter to all users who wrote to this bot. vk ... user_id=event.user_id, random_id=get_random_id(), message='GG, well played' )

Discord.py bot-the on member join method does not work

intents = discord.Intents.all() client = discord.Client(intents=intents) bot = commands.Bot(command_prefix='$') @bot.event ... n(member): //код Neither @bot.event nor @client.event work. SERVER MEMBERS INTENT is enabled. What could be the problem?

Entering data into a variable and outputting it in a module Discord.py

I just recently started working with a module for Python 'Discord.py' and I had the need to create a function that works like ... возможно в переменной. await message.channel.send('') #Бот его должен вывести. client.run('TOKEN') My Python 3.7.0

When writing a telegram bot in python, it gives the error SyntaxError: 'break' outside loop

import random import telebot spisok=('автострада','спасибо') a=random.choice(spisok) b=(list(a)) n=li ... if s==5: return bot.send_message(message.chat.id, ''.join(n)) bot.polling(none_stop=True)

Discord rection of Bots on Webhooks

I want to make The bot added a response to a message from the WEBhook, but it doesn't. Is there a solution?

How do I get a role in Discord using a python bot?

I'm making a Discord bot on python 3.8. If you write some command in the discord bot, then it should "reward" the author of t ... d.utils.get(member.guild.roles, id = 'id of role') await member.add_roles (message.author, role) client.run("token")

How to understand what a bot is in a conversation in the node-vk-bot-api library

Is there a line in the LongPoll API that is responsible for the conversation? I'm making a bot and it's not optimized for conversation at all. I need to know how to do this.

The diskord bot bans those who are forbidden to ban

The bot discord bans those who can not be baned, I set the variable "a" to the value "user" and then output it: Code: @bot.co ... ht was strange), but when I wrote the condition that if a = = "nickname" is not banned, the user was still sent to the ban...