1.1.5 • Published 4 years ago
Darkwolf Bots
Install
npm i --save dwbots
Usage
const DarkwolfBots = require('dwbots')
const dwbots = new DarkwolfBots(token)
await dwbots.getMe()
await dwbots.createTelegramBot('Darkwolf Bot', botToken)
Init
new DarkwolfBots(token)
Methods
request(query, variables, optionsignoreErrors?)
getMe()
getBot(botId)
getUser(userId)
getBotUser(botId, userId, optionslanguageCode?)
setName(name)
setPayload(payload?)
refreshBotToken(botId)
setBotName(botId, name)
setBotPayload(botId, payload?)
setBotWebhook(botId, webhookUrl, optionsauthToken?)
setTelegramBotToken(botId, botToken)
setUserDisplayName(userId, displayName)
setUserPayload(userId, payload?)
setUserLanguage(userId, languageCode?)
setBotUserAdmin(botId, userId)
unsetBotUserAdmin(botId, userId)
setBotUserDisplayName(botId, userId, displayName?)
setBotUserAction(botId, userId, action?)
setBotUserState(botId, userId, state?)
setBotUserActionState(botId, userId, action?, state?)
setBotUserPayload(botId, userId, payload?)
setBotUserLanguage(botId, userId, languageCode?)
unbanBotUser(botId, userId)