Constructors
constructor
- new Database(url, client): Database
-
Parameters
-
url: string
-
client: Client<boolean>
Properties
Private
#url
#url: string
client
client: Client<boolean>
dbs
dbs: { settings: Model<Settings, {}, {}, {}, Document<unknown, {}, Settings> & Settings & { _id: ObjectId; }, Schema<Settings, Model<Settings, any, any, any, Document<unknown, any, Settings> & Settings & { _id: ObjectId; }, any>, {}, {}, {}, {}, DefaultSchemaOptions, Settings, Document<unknown, {}, FlatRecord<Settings>> & FlatRecord<Settings> & { _id: ObjectId; }>>; users: Model<Users, {}, {}, {}, Document<unknown, {}, Users> & Users & { _id: ObjectId; }, Schema<Users, Model<Users, any, any, any, Document<unknown, any, Users> & Users & { _id: ObjectId; }, any>, {}, {}, {}, {}, DefaultSchemaOptions, Users, Document<unknown, {}, FlatRecord<Users>> & FlatRecord<Users> & { _id: ObjectId; }>>; weekly: Model<Weekly, {}, {}, {}, Document<unknown, {}, Weekly> & Weekly & { _id: ObjectId; }, Schema<Weekly, Model<Weekly, any, any, any, Document<unknown, any, Weekly> & Weekly & { _id: ObjectId; }, any>, {}, {}, {}, {}, DefaultSchemaOptions, Weekly, Document<unknown, {}, FlatRecord<Weekly>> & FlatRecord<Weekly> & { _id: ObjectId; }>>; } = ...
Type declaration
-
settings: Model<Settings, {}, {}, {}, Document<unknown, {}, Settings> & Settings & {
_id: ObjectId;
}, Schema<Settings, Model<Settings, any, any, any, Document<unknown, any, Settings> & Settings & {
_id: ObjectId;
}, any>, {}, {}, {}, {}, DefaultSchemaOptions, Settings, Document<unknown, {}, FlatRecord<Settings>> & FlatRecord<Settings> & {
_id: ObjectId;
}>>
-
users: Model<Users, {}, {}, {}, Document<unknown, {}, Users> & Users & {
_id: ObjectId;
}, Schema<Users, Model<Users, any, any, any, Document<unknown, any, Users> & Users & {
_id: ObjectId;
}, any>, {}, {}, {}, {}, DefaultSchemaOptions, Users, Document<unknown, {}, FlatRecord<Users>> & FlatRecord<Users> & {
_id: ObjectId;
}>>
-
weekly: Model<Weekly, {}, {}, {}, Document<unknown, {}, Weekly> & Weekly & {
_id: ObjectId;
}, Schema<Weekly, Model<Weekly, any, any, any, Document<unknown, any, Weekly> & Weekly & {
_id: ObjectId;
}, any>, {}, {}, {}, {}, DefaultSchemaOptions, Weekly, Document<unknown, {}, FlatRecord<Weekly>> & FlatRecord<Weekly> & {
_id: ObjectId;
}>>
Accessors
weekly
- get weekly(): {
add: ((guildId, data) => Promise<null | Document<unknown, {}, Weekly> & Weekly & {
_id: ObjectId;
}>);
get: ((guildId, id?) => Promise<null | Document<unknown, {}, Weekly> & Weekly & {
_id: ObjectId;
}>);
}
-
Returns {
add: ((guildId, data) => Promise<null | Document<unknown, {}, Weekly> & Weekly & {
_id: ObjectId;
}>);
get: ((guildId, id?) => Promise<null | Document<unknown, {}, Weekly> & Weekly & {
_id: ObjectId;
}>);
}
-
add: ((guildId, data) => Promise<null | Document<unknown, {}, Weekly> & Weekly & {
_id: ObjectId;
}>)
-
- (guildId, data): Promise<null | Document<unknown, {}, Weekly> & Weekly & {
_id: ObjectId;
}>
-
Returns Promise<null | Document<unknown, {}, Weekly> & Weekly & {
_id: ObjectId;
}>
-
get: ((guildId, id?) => Promise<null | Document<unknown, {}, Weekly> & Weekly & {
_id: ObjectId;
}>)
-
- (guildId, id?): Promise<null | Document<unknown, {}, Weekly> & Weekly & {
_id: ObjectId;
}>
-
Parameters
-
guildId: string
-
Optional
id: string
Returns Promise<null | Document<unknown, {}, Weekly> & Weekly & {
_id: ObjectId;
}>
Methods
Private
#connect
- #connect(): undefined | Promise<__module>
-
Returns undefined | Promise<__module>
getSettings
- getSettings(guildId): Promise<null | Document<unknown, {}, Settings> & Settings & {
_id: ObjectId;
}>
-
Returns Promise<null | Document<unknown, {}, Settings> & Settings & {
_id: ObjectId;
}>
getUser
- getUser(userId, guildId): Promise<null | Document<unknown, {}, Users> & Users & {
_id: ObjectId;
}>
-
Parameters
-
userId: string
-
guildId: string
Returns Promise<null | Document<unknown, {}, Users> & Users & {
_id: ObjectId;
}>
handleWeeklyAnnounce
- handleWeeklyAnnounce(data): Promise<undefined | null | Message<true> | Message<false>>
-
Returns Promise<undefined | null | Message<true> | Message<false>>