1.0.3 • Published 4 years ago
hydrogenbotapi v1.0.3
hydrogenbotapi
This is the official library to interact with hydrogen api. You could found the documentation here
Installation
First, type this in the command prompt: npm i hydrogenbotapi
Then, type this at the top of the js file:
const Hydrogen = require("hydrogenbotapi")
let API = new Hydrogen(Auth_Token)
Obtaining the auth token
You could obtain the token by doing H!gentoken
in any discord server that hydrogen is in.
Usages
Get Guild
This will get info on a guild including global chat, the prefix of the server, and etc.
const Hydrogen = require("hydrogenbotapi")
let API = new Hydrogen(Auth_Token)
API.getGuild(guildid)//returns: {"id":"665073912471748628","name":"Hydrogen Support Guild","globalchatenabled":true,"prefix":"Y!","infinite": true}
Get User
This will get info on a user including premium status of the user, and etc.
const Hydrogen = require("hydrogenbotapi")
let API = new Hydrogen(Auth_Token)
API.getUser(userid)//returns: {"id":"539195184357965833","name":"2 Days 'til bday#6715","level":44,"hydrogens":16767, premium: 2}
Post Prefix
This post request will change the prefix of a server. You must change only your own server.
const Hydrogen = require("hydrogenbotapi")
let API = new Hydrogen(Auth_Token)
API.postPrefix(guildid, Prefix)//returns: {"id":"539195184357965833","name":"2 Days 'til bday#6715","level":44,"hydrogens":16767, premium: 2}
Support
You could contact support in our discord server
License
MIT license, obtained by Hydrogen Studio
� 2019-2020 Hydrogen Studio, All Rights Reserved