Skip to content

Commit f3f477b

Browse files
committed
FUNDING&README
1 parent 74b42c2 commit f3f477b

File tree

3 files changed

+33
-0
lines changed

3 files changed

+33
-0
lines changed

.github/FUNDING.yml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# These are supported funding model platforms
2+
3+
github: [masnn]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: # Replace with a single Liberapay username
10+
issuehunt: # Replace with a single IssueHunt username
11+
otechie: # Replace with a single Otechie username
12+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
# Sayobot-BBS

handlers/message.js

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
const
2+
Router = require('koa-router'),
3+
{ ObjectID } = require('bson'),
4+
{ PermissionError } = require('../errors.js'),
5+
{ PERM_THREAD_CREATE, PERM_THREAD_REPLY, PERM_THREAD_DELETE, PERM_REPLY_DELETE } = require('../constants.js');
6+
7+
module.exports = class HANDLER_MAIN {
8+
constructor(i) {
9+
this.db = i.db;
10+
this.lib = i.lib;
11+
this.router = new Router();
12+
}
13+
async getUser(uid) {
14+
let _id = new ObjectID(uid);
15+
return new this.lib.user.user(await this.db.collection('user').findOne({ _id }));
16+
}
17+
async init() {
18+
return this.router;
19+
}
20+
};

0 commit comments

Comments
 (0)