Compare commits
6 Commits
Author | SHA1 | Date |
---|---|---|
JeanOUINA | 39fc7f2893 | |
Aiden | dc3e90125f | |
smartfridge | 8ab6645d2c | |
Seth Falco | c746a6da1a | |
Seth Falco | b2ffdc088c | |
Seth Falco | aee1584dbf |
|
@ -0,0 +1,23 @@
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
indent_style = space
|
||||||
|
indent_size = 4
|
||||||
|
end_of_line = lf
|
||||||
|
charset = utf-8
|
||||||
|
trim_trailing_whitespace = true
|
||||||
|
insert_final_newline = true
|
||||||
|
curly_bracket_next_line = false
|
||||||
|
spaces_around_operators = true
|
||||||
|
|
||||||
|
[*.{js,ts}]
|
||||||
|
quote_type = double
|
||||||
|
|
||||||
|
[*.{markdown,md}]
|
||||||
|
trim_trailing_whitespace = false
|
||||||
|
|
||||||
|
[*.tsv]
|
||||||
|
indent_style = tab
|
||||||
|
|
||||||
|
[*.yml]
|
||||||
|
indent_size = 2
|
|
@ -17,11 +17,12 @@ let emojiSearch = BDModules.get(e => e.default && e.default.getDisambiguatedEmoj
|
||||||
const appSettings = Lightcord.Api.settings
|
const appSettings = Lightcord.Api.settings
|
||||||
|
|
||||||
export default new class EmojiModule {
|
export default new class EmojiModule {
|
||||||
constructor(){
|
|
||||||
this.init().catch(err => Utils.err("EmojiModule", "An error occured", err)) // better logging
|
constructor() {
|
||||||
|
this.init().catch(err => Utils.err("EmojiModule", "An error occured", err))
|
||||||
}
|
}
|
||||||
|
|
||||||
async init(){
|
async init() {
|
||||||
/** Emoji AutoComplete */
|
/** Emoji AutoComplete */
|
||||||
if(!AutocompleteModule)AutocompleteModule = await window.Lightcord.Api.ensureExported(e => e.default && e.default.displayName === "Autocomplete")
|
if(!AutocompleteModule)AutocompleteModule = await window.Lightcord.Api.ensureExported(e => e.default && e.default.displayName === "Autocomplete")
|
||||||
if(!AutoCompletionTemplates)AutoCompletionTemplates = await window.Lightcord.Api.ensureExported(e => e.getAutocompleteOptions)
|
if(!AutoCompletionTemplates)AutoCompletionTemplates = await window.Lightcord.Api.ensureExported(e => e.getAutocompleteOptions)
|
||||||
|
@ -38,7 +39,7 @@ export default new class EmojiModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(AutocompleteModule && AutoCompletionTemplates && EmojiModuleQuery && Messages && guildModule && emojiSearch){
|
if(AutocompleteModule && AutoCompletionTemplates && EmojiModuleQuery && Messages && guildModule && emojiSearch){
|
||||||
console.log(`Patching getAutocompleteOptions of AutoCompletionTemplates`, AutoCompletionTemplates)
|
Utils.log("EmojiModule", `Patching getAutocompleteOptions of AutoCompletionTemplates`, AutoCompletionTemplates)
|
||||||
const getAutocompleteOptions = AutoCompletionTemplates.getAutocompleteOptions
|
const getAutocompleteOptions = AutoCompletionTemplates.getAutocompleteOptions
|
||||||
AutoCompletionTemplates.getAutocompleteOptions = function(e, t, n, r, a){
|
AutoCompletionTemplates.getAutocompleteOptions = function(e, t, n, r, a){
|
||||||
const value = getAutocompleteOptions.call(this, ...arguments)
|
const value = getAutocompleteOptions.call(this, ...arguments)
|
||||||
|
@ -81,20 +82,20 @@ export default new class EmojiModule {
|
||||||
}
|
}
|
||||||
return value
|
return value
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
console.error(new Error("Couldn't start autocompletion of Lightcord's emojis."))
|
Utils.err("EmojiModule", "Couldn't start auto-completion of Lightcord's emojis.")
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Emoji display */
|
/** Emoji display */
|
||||||
while (!BDV2.MessageComponent) await new Promise(resolve => setTimeout(resolve, 100));
|
while (!BDV2.MessageComponent) await new Promise(resolve => setTimeout(resolve, 100));
|
||||||
|
|
||||||
if (!this.cancelEmojiRender){ // TODO: Proper emoji formatting / rendering
|
if (!this.cancelEmojiRender) { // TODO: Proper emoji formatting / rendering
|
||||||
this.cancelEmoteRender = Utils.monkeyPatch(BDV2.MessageComponent, "default", {before: (data) => {
|
this.cancelEmoteRender = Utils.monkeyPatch(BDV2.MessageComponent, "default", {before: (data) => {
|
||||||
const message = Utils.getNestedProp(data.methodArguments[0], "childrenMessageContent.props.message")
|
const message = Utils.getNestedProp(data.methodArguments[0], "childrenMessageContent.props.message")
|
||||||
if(!message)return
|
if(!message)return
|
||||||
const content = Utils.getNestedProp(data.methodArguments[0], "childrenMessageContent.props.content")
|
const content = Utils.getNestedProp(data.methodArguments[0], "childrenMessageContent.props.content")
|
||||||
if(!content || !content.length)return
|
if(!content || !content.length)return
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @type {{
|
* @type {{
|
||||||
* raw: string,
|
* raw: string,
|
||||||
|
@ -104,16 +105,16 @@ export default new class EmojiModule {
|
||||||
* }[]}
|
* }[]}
|
||||||
*/
|
*/
|
||||||
let emojis = []
|
let emojis = []
|
||||||
|
|
||||||
const newContent = []
|
const newContent = []
|
||||||
for(let node of content){
|
for(let node of content) {
|
||||||
if (typeof(node) !== "string") {
|
if (typeof(node) !== "string") {
|
||||||
newContent.push(node)
|
newContent.push(node)
|
||||||
continue
|
continue
|
||||||
};
|
}
|
||||||
let parsed;
|
let parsed;
|
||||||
let hasParsed = false
|
let hasParsed = false
|
||||||
|
|
||||||
do {
|
do {
|
||||||
parsed = Constants.EmojiRegex.exec(node);
|
parsed = Constants.EmojiRegex.exec(node);
|
||||||
if (parsed) {
|
if (parsed) {
|
||||||
|
@ -137,7 +138,7 @@ export default new class EmojiModule {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} while (parsed);
|
} while (parsed);
|
||||||
|
|
||||||
if(hasParsed){
|
if(hasParsed){
|
||||||
const words = node.split(" ").map((word, index, arr) => {
|
const words = node.split(" ").map((word, index, arr) => {
|
||||||
if(!word)return ""
|
if(!word)return ""
|
||||||
|
@ -197,7 +198,7 @@ export default new class EmojiModule {
|
||||||
emojiDescriptors: this.props.emojiDescriptors.map(e => {
|
emojiDescriptors: this.props.emojiDescriptors.map(e => {
|
||||||
e.isDisabled = false
|
e.isDisabled = false
|
||||||
})
|
})
|
||||||
}))
|
}))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
EmojiPickerListRow.default.displayName = "EmojiPickerListRow"
|
EmojiPickerListRow.default.displayName = "EmojiPickerListRow"
|
||||||
|
@ -211,7 +212,7 @@ export default new class EmojiModule {
|
||||||
}
|
}
|
||||||
|
|
||||||
start(){
|
start(){
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,4 +264,4 @@ function setEmojiUsable(usable){
|
||||||
}
|
}
|
||||||
return isEmojiDisabled.call(this, ...arguments)
|
return isEmojiDisabled.call(this, ...arguments)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,7 +92,7 @@ export default class Permissions extends BitField {
|
||||||
* - `MANAGE_WEBHOOKS`
|
* - `MANAGE_WEBHOOKS`
|
||||||
* - `MANAGE_EMOJIS`
|
* - `MANAGE_EMOJIS`
|
||||||
* @type {Object}
|
* @type {Object}
|
||||||
* @see {@link https://discordapp.com/developers/docs/topics/permissions}
|
* @see {@link https://discord.com/developers/docs/topics/permissions}
|
||||||
*/
|
*/
|
||||||
static FLAGS:{
|
static FLAGS:{
|
||||||
CREATE_INSTANT_INVITE: number,
|
CREATE_INSTANT_INVITE: number,
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
Name=Lightcord
|
Name=Lightcord
|
||||||
StartupWMClass=lightcord
|
StartupWMClass=lightcord
|
||||||
Comment[fr_FR]=Un client Discord simple et personalisable
|
Comment[fr_FR]=Un client Discord simple et personalisable
|
||||||
|
Comment[no]=En enkel - tilpassbar - Discord klient
|
||||||
Comment=A simple - customizable - Discord Client
|
Comment=A simple - customizable - Discord Client
|
||||||
Exec=/opt/Lightcord/Lightcord
|
Exec=/opt/Lightcord/Lightcord
|
||||||
Icon=lightcord
|
Icon=lightcord
|
||||||
|
|
|
@ -11,6 +11,8 @@
|
||||||
[![ETH](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/papycochon/cryptodonate/master/badges/ethereum.json&style=flat-square)](https://papycochon.github.io/cryptodonate/eth.html?address=0xEFE45F22Ee844bf2Ba0E4d853FA0bC8c028fAfFe¬e=https://github.com/Lightcord/Lightcord)
|
[![ETH](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/papycochon/cryptodonate/master/badges/ethereum.json&style=flat-square)](https://papycochon.github.io/cryptodonate/eth.html?address=0xEFE45F22Ee844bf2Ba0E4d853FA0bC8c028fAfFe¬e=https://github.com/Lightcord/Lightcord)
|
||||||
[![LTC](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/papycochob/cryptodonate/master/badges/litecoin.json&style=flat-square)](https://papycochon.github.io/cryptodonate/ltc.html?address=LNTmfMjHJgTHaB7rj8ZuWWuU1XkP2YeGCA¬e=https://github.com/Lightcord/Lightcord)
|
[![LTC](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/papycochob/cryptodonate/master/badges/litecoin.json&style=flat-square)](https://papycochon.github.io/cryptodonate/ltc.html?address=LNTmfMjHJgTHaB7rj8ZuWWuU1XkP2YeGCA¬e=https://github.com/Lightcord/Lightcord)
|
||||||
|
|
||||||
|
# Lightcord has been abandoned and no longer receives support or updates!
|
||||||
|
|
||||||
# About
|
# About
|
||||||
|
|
||||||
[Lightcord](https://lightcord.org) is a simple and customizable client for Discord.
|
[Lightcord](https://lightcord.org) is a simple and customizable client for Discord.
|
||||||
|
@ -33,8 +35,7 @@ It includes [BandagedBD](https://github.com/rauenzi/BetterDiscordApp), [Glasstro
|
||||||
|
|
||||||
## Planned Features
|
## Planned Features
|
||||||
|
|
||||||
* **Username History** - Keep track of your past usernames!
|
Lightcord is no longer updated
|
||||||
* **New Plugin Directory** - Easily install or edit themes and plugins!
|
|
||||||
|
|
||||||
# Installing
|
# Installing
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue