bd-linestickers
bd-linestickers copied to clipboard
BetterDiscord Line Stickers Plugin
Feel free to join the Discord server and ping me if you have any questions or open an Issue on GitHub
日本語の解説
BetterDiscord LINE Stickers Plugin
Extends BetterDiscord emote menu to add a tab with LINE stickers to it
※ to enable Dark theme, enable Dark mode in BetterDiscord settings
Installation
- Install Bandaged BetterDiscord
- Install the plugin by using one of the following methods:
- Downloading it:
- Open the the plugin folder:
- using the button on plugins tab or
- opening it with your file manager at:
- Windows:
C:\Users\<user>\AppData\Roaming\BetterDiscord\plugins
- Linux:
/home/<user>/.config/BetterDiscord/plugins/
- MacOS:
/Users/<user>/Library/Preferences/BetterDiscord/plugins
- Windows:
- Download the plugin and copy it there
- Open the the plugin folder:
- Building it yourself:
- Clone the repository and run the following commands:
-
npm install
-
npm run build
-
- Clone the repository and run the following commands:
- Downloading it:
- Make sure the plugin is enabled:
- Open
User Settings
-BetterDiscord
-Plugins
- If you don't see the plugin in the list, try restarting Discord (Ctrl + R or a method of your choice)
- Enable it
- Open
- Open the Emote menu, you should see a LINE tab in there
Removing or renaming stickers
Move your cursor into the right part of the title, you'll see two icons there
Deleting
Click on the cross icon and confirm deletion
Renaming
Click on the pen icon, edit the name, then either press Enter
or click away
※ In case of an emergency, you can edit the config at %appdata%\BetterDiscord\plugins\lineemotes.config.json
manually, after making changes, please fully restart Discord by closing it and opening it again
Adding stickers
Getting stickers
You can find them on LINE Store
※ No, you don't need to buy them
To add a sticker pack you'll need:
- it's title
- the ID of a first sticker
- total count of stickers in a pack
There are two ways of adding stickers:
- via tab in emote menu
- via Discord console
Via tab in the menu
-
Open the tab by pressing the plus sign at the bottom
-
The following form should show up:
-
Enter the title, amount of stickers in a pack and the ID of the first sticker and press
Add
button
Via Discord console
-
Open the developer tools by pressing
Ctrl + Shift + I
-
In a console, execute the following command:
lineemotes.appendPack(`title`, first_sticker_id, sticker count)
※ for examplelineemotes.appendPack(`Miko sister of fox`, 1133826, 40)
Getting sticker's title, ID and sticker count
Grease/Tampermonkey user script
If you're using Greasemonkey or Tampermonkey you can download a user script that will show you the title, first sticker ID, amount of stickers and append string on the page
Javascript in the console
Similar to user script above, you can run the following scary looking line of JavaScript in your browser's console. It will output the same thing script above would.
※ You can access the console by opening Developer Tools from context menu by right clicking somewhere on the page or using the same Ctrl + Shift + I hotkey to open Developer Tools
console.log('Title: ' + $('.mdCMN08Ttl').text() + '\nFirst sticker ID: ' + $('.mdCMN09Image').first().css('background-image').match(/sticker\/(\d+)/)[1] + '\nLength: ' + $('.mdCMN09Li').length.toString() + '\nAppend string:\n' + 'lineemotes.appendPack(`' + $('.mdCMN08Ttl').text() + '`, ' + $('.mdCMN09Image').first().css('background-image').match(/sticker\/(\d+)/)[1] + ', ' + $('.mdCMN09Li').length.toString() + ')')
Manual way
Finding first sticker ID
Sticker ID can be found in a sticker URL, the said URL can be extracted from a page by right clicking on a sticker and inspecting the element
Finding sticker count
Just count them =P
Default sticker count is 40, which is the standard for most sticker packs, however, some packs, usually animated, can be an exception to this
Resizing the window
You can resize the LINE tab using the following commands in console:
lineemotes.menu.setWidth(width)
lineemotes.menu.setHeight(height)
lineemotes.menu.setSize(width, height)
※ for example lineemotes.menu.setSize(494, 326)
Adding unavailable stickers
Some sticker packs might greet you with the message above
One way to get sticker IDs is to download the pack using the API endpoint that LINE app is using, use the following template
https://dl.stickershop.line.naver.jp/products/0/0/1/<packid>/android/stickers.zip
For example https://dl.stickershop.line.naver.jp/products/0/0/1/2999/android/stickers.zip
for the pack above
Note: you can find the pack ID in the page's URL
Using a file archiver of your choice, open the zip file, find the sticker with the lowest ID, that will be the first sticker ID
※ assuming sticker count is 40, if the zip file doesn't contain 83 files (40 stickers, 40 thumbnails, 2 category icons, 1 metadata file), set the sticker count accordingly
CSS patches for theme compatibility
Copy and paste the CSS patch into Custom CSS