Skip to content

Commit bd950e2

Browse files
authored
Merge ccf9e7f into dcf3a73
2 parents dcf3a73 + ccf9e7f commit bd950e2

File tree

11 files changed

+305
-138
lines changed

11 files changed

+305
-138
lines changed

.eslintrc.js

+7-3
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,13 @@ module.exports = {
1515
plugins: ['@typescript-eslint', 'jest'],
1616
rules: {
1717
'prettier/prettier': 'warn',
18-
'no-cond-assign': [2, 'except-parens'],
19-
'no-unused-vars': 0,
20-
'@typescript-eslint/no-unused-vars': 1,
18+
'no-cond-assign': ['error', 'except-parens'],
19+
'no-unused-vars': 'off',
20+
'@typescript-eslint/no-unused-vars': 'warn',
21+
'no-redeclare': 'off',
22+
'@typescript-eslint/no-redeclare': 'warn',
23+
'no-dupe-class-members': 'off',
24+
'@typescript-eslint/no-dupe-class-members': 'warn',
2125
'no-empty': [
2226
'error',
2327
{

docs/examples/service-class.js

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
const dbots = require('dbots')
2+
3+
// You can get the service class through the Service util, using a service alias
4+
const TopGG = dbots.Service.get('topgg')
5+
6+
// You can craete an instance using your token, that will allow you to access the API
7+
const serviceInstance = new TopGG('your-token')
8+
9+
// You can then use every method listed in the class docs
10+
serviceInstance.getBot('bot-id')
11+
.then(data => {
12+
// ...
13+
})
14+
.catch(console.error)

docs/index.yml

+2
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,5 @@
1616
path: no-client.js
1717
- name: Custom Services
1818
path: custom-service.js
19+
- name: Using Service classes
20+
path: service-class.js

0 commit comments

Comments
 (0)