Closed hamhub7 closed 5 years ago
Upon further inspection, I found that disabling the "All memebers are admin" in my group then checking my bot allows it to delete the message. I want to know now if that is possible in dms, and if that process can be automated
You can't delete messages of ther other user in DMs Also, for your bot to be able to delete messages in groups, your bot has to be admin in that group. I think the "all members are admin" does not allow all members to delete messages from every user.
Is this question answered? @hamhub7
I think this issue can be closed since no activity @rubenlagus
I am trying to delete a message using my bot in a direct message, and I get this error: org.telegram.telegrambots.meta.exceptions.TelegramApiRequestException: Error deleting message: [400] Bad Request: message can't be deleted at org.telegram.telegrambots.meta.api.methods.updatingmessages.DeleteMessage.deserializeResponse(DeleteMessage.java:95) at org.telegram.telegrambots.meta.api.methods.updatingmessages.DeleteMessage.deserializeResponse(DeleteMessage.java:26) at org.telegram.telegrambots.bots.DefaultAbsSender.sendApiMethod(DefaultAbsSender.java:717) at org.telegram.telegrambots.meta.bots.AbsSender.execute(AbsSender.java:47) at hamhub7.seversonbot.Bot.onUpdateReceived(Bot.java:170) at java.util.ArrayList.forEach(Unknown Source) at org.telegram.telegrambots.meta.generics.LongPollingBot.onUpdatesReceived(LongPollingBot.java:27) at org.telegram.telegrambots.updatesreceivers.DefaultBotSession$HandlerThread.run(DefaultBotSession.java:305) Dec 01, 2018 12:00:06 AM org.telegram.telegrambots.meta.logging.BotLogger severe SEVERE: BOTSESSION java.lang.NullPointerException at hamhub7.seversonbot.Bot.onUpdateReceived(Bot.java:23) at java.util.ArrayList.forEach(Unknown Source) at org.telegram.telegrambots.meta.generics.LongPollingBot.onUpdatesReceived(LongPollingBot.java:27) at org.telegram.telegrambots.updatesreceivers.DefaultBotSession$HandlerThread.run(DefaultBotSession.java:305)
It seems like the bot does not have enough permissions, but I am not sure how to add them. Can I have the bot automatically request permissions? Can I add them through @BotFather? Where do I go from here?