1.1.5 • Published 4 years ago

dwbots v1.1.5

Weekly downloads
2
License
Apache-2.0
Repository
github
Last release
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)

getBots(optionsbefore, after, first, last, orderBy?)

getUser(userId)

getUsers(optionsbefore, after, first, last, orderBy?)

getBotUser(botId, userId, optionslanguageCode?)

getBotUsers(botId, optionsbefore, after, first, last, orderBy, languageCode?)

getBotAdmins(botId, optionsbefore, after, first, last, orderBy, languageCode?)

getBotBannedUsers(botId, optionsbefore, after, first, last, orderBy, languageCode?)

createTelegramBot(name, botToken, optionspayload, webhookUrl, authToken, enableLanguage, enableLocation, enablePhoneNumber?)

setName(name)

setPayload(payload?)

refreshBotToken(botId)

setBotName(botId, name)

setBotPayload(botId, payload?)

setBotWebhook(botId, webhookUrl, optionsauthToken?)

setTelegramBotToken(botId, botToken)

setTelegramBotSettings(botId, optionsenableLanguage, enableLocation, enablePhoneNumber)

setTelegramBotSettingsLanguage(botId, optionsrequestLanguage, disableLanguageCommand, allowedLanguages)

setTelegramBotSettingsLocation(botId, optionsrequestLocation, disableCountryCommand, disableLocationCommand, disableSelectState, disableSelectCity, allowedCountries)

setTelegramBotSettingsPhoneNumber(botId, optionsrequestPhoneNumber, allowedCountries)

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?)

banBotUser(botId, userId, optionsduration, until, reason?)

unbanBotUser(botId, userId)

1.1.5

4 years ago

1.1.4

4 years ago

1.1.3

4 years ago

1.1.2

4 years ago

1.1.1

4 years ago

1.1.0

4 years ago

1.0.9

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

5 years ago