Please i need a recommendation of a bot or how to make a bot or who makes a bot
That can send mass dm in discord and telegram
All recommendations are appreciated
That can send mass dm in discord and telegram
All recommendations are appreciated
import telegram
bot = telegram.Bot(token='YOUR_TOKEN')
user_ids = ['123456', '7891011', '12131415']
for user_id in user_ids:
try:
bot.send_message(chat_id=user_id, text="Hello, I'm your bot!")
print(f"Message sent to user {user_id}")
except Exception as e:
print(f"Error sending message to user {user_id}: {e}")
import io.github.kurenairyu.tdlight.Client
import io.github.kurenairyu.tdlight.exception.ClientException
import io.github.kurenairyu.tdlight.handler.UpdateHandler
import io.github.kurenairyu.tdlight.util.ResultHandler
import io.github.kurenairyu.tdlight.util.TelegramObject
import io.github.kurenairyu.tdlight.util.TdApi
class Bot(token: String = "YOUR_TOKEN") {
private val client = Client.create(token)
fun init() {
client.start()
}
fun sendDirectMessagesToFriends(message: String) {
client.send(TdApi.GetContacts(), object : ResultHandler {
override fun onResult(obj: TelegramObject) {
if (obj is TdApi.Users) {
obj.users.filterIsInstance<TdApi.User>().forEach { user ->
if (user.type.constructor == TdApi.UserTypeBot.CONSTRUCTOR) {
//Ignore bots
return@forEach
}
client.send(TdApi.SendMessage(user.id, 0, false, false, null, TdApi.InputMessageText(TdApi.FormattedText(message, null), false, true)))
}
}
}
})
}
}
PMPlease i need a recommendation of a bot or how to make a bot or who makes a bot
That can send mass dm in discord and telegram
All recommendations are appreciated