bots

How to retrieve a specific message by ID (tried fetch_message(id))

痴心易碎 提交于 2020-08-20 11:32:10
问题 @client.command() async def edit(ctx, message_id, *, new_message) : channel, chan, guild = None, list_channels("saved_channels.csv"), ctx.guild.id message = await fetch_message(message_id) await message.edit(new_message) embed=discord.Embed(color=0x00ca1f) embed.add_field(name="Success :white_check_mark:", value=f"Le message a bien été édité dans {message.channel.mention}", inline=False) await ctx.send(embed = embed) I'm trying to edit a specific message my bot sent in another channel by

Facebook bot with Php (#100) Tried accessing nonexisting field (messages) on node type (Page)

馋奶兔 提交于 2020-08-11 03:13:33
问题 I'm trying to make Facebook bot with PHP, but when i try to open https://graph.facebook.com/v3.2/me/messages?access_token=MY-ACCESS-TOKEN I got this error message. { "error": { "message": "(#100) Tried accessing nonexisting field (messages) on node type (Page)", "type": "OAuthException", "code": 100, "fbtrace_id": "FsRWv82pTHO" } } Also when i open my code i got this error. Notice: Trying to get property of non-object in /storage/ssd3/943/6474943/public_html/index.php on line 11 回答1: You are

discord bot waiting for message

不羁岁月 提交于 2020-08-10 19:08:07
问题 So as the title suggests I'm trying to make my bot respond to a certain message. So after a user sends an image, it'll respond with a compliment, then if the user RESPONDS TO THAT MESSAGE with a message such as "thanks" the bot will then go on to respond with a different message, but I'm trying to make it respond to multiple versions of "thanks" using if statements. This is the code so far: if '.png' in message.content or '.jpg' in message.content or '.jpeg' in message.content: await bot.send