Add file headers

This commit is contained in:
Samuel Elliott 2018-04-14 17:37:41 +01:00
parent 4837a01812
commit 146e108874
No known key found for this signature in database
GPG Key ID: 8420C7CDE43DC4D6
6 changed files with 56 additions and 1 deletions

View File

@ -1,3 +1,12 @@
/**
* BetterDiscord Discord API
* Copyright (c) 2015-present Jiiks/JsSucks - https://github.com/Jiiks / https://github.com/JsSucks
* All rights reserved.
* https://betterdiscord.net
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import { List, InsufficientPermissions } from 'structs';
import { User, Channel, Guild, Message } from 'discordstructs';
@ -185,6 +194,7 @@ export class UserSettings {
static get friend_source_everyone() { return this.friend_source_flags.include('all') }
static get friend_source_mutual_friends() { return this.friend_source_flags.include('all') || this.friend_source_flags.include('mutual_friends') }
static get friend_source_mutual_guilds() { return this.friend_source_flags.include('all') || this.friend_source_flags.include('mutual_guilds') }
static get friend_source_anyone() { return this.friend_source_flags.length > 0 }
/**
* Whether to automatically add accounts from other platforms running on the user's computer.

View File

@ -1,3 +1,12 @@
/**
* BetterDiscord Channel Struct
* Copyright (c) 2015-present Jiiks/JsSucks - https://github.com/Jiiks / https://github.com/JsSucks
* All rights reserved.
* https://betterdiscord.net
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import { DiscordApi, DiscordApiModules as Modules } from 'modules';
import { List, InsufficientPermissions } from 'structs';

View File

@ -1,3 +1,12 @@
/**
* BetterDiscord Guild Struct
* Copyright (c) 2015-present Jiiks/JsSucks - https://github.com/Jiiks / https://github.com/JsSucks
* All rights reserved.
* https://betterdiscord.net
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import { DiscordApi, DiscordApiModules as Modules } from 'modules';
import { List } from 'structs';
@ -183,7 +192,7 @@ export class Guild {
* Whether the user has not restricted direct messages from members of this guild.
*/
get allow_dms() {
return !DiscordApi.UserPreferences.restricted_guild_ids.includes(this.id);
return !DiscordApi.UserSettings.restricted_guild_ids.includes(this.id);
}
/**

View File

@ -1,3 +1,12 @@
/**
* BetterDiscord Message Struct
* Copyright (c) 2015-present Jiiks/JsSucks - https://github.com/Jiiks / https://github.com/JsSucks
* All rights reserved.
* https://betterdiscord.net
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import { DiscordApi, DiscordApiModules as Modules } from 'modules';
import { Channel } from './channel';

View File

@ -1,3 +1,12 @@
/**
* BetterDiscord User Struct
* Copyright (c) 2015-present Jiiks/JsSucks - https://github.com/Jiiks / https://github.com/JsSucks
* All rights reserved.
* https://betterdiscord.net
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import { DiscordApi, DiscordApiModules as Modules } from 'modules';
import { List, InsufficientPermissions } from 'structs';

View File

@ -1,3 +1,12 @@
/**
* BetterDiscord Permissions Error Struct
* Copyright (c) 2015-present Jiiks/JsSucks - https://github.com/Jiiks / https://github.com/JsSucks
* All rights reserved.
* https://betterdiscord.net
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
import ErrorEvent from './error';