GithubHelp home page GithubHelp logo

doc22940 / shortcutspreview Goto Github PK

View Code? Open in Web Editor NEW

This project forked from haykam821/shortcutspreview

0.0 1.0 0.0 93 KB

A multiplatform bot for showing the details of Shortcuts when linked by their iCloud URL.

License: MIT License

JavaScript 100.00%

shortcutspreview's Introduction

ShortcutsPreview

A multiplatform bot for showing the details of Shortcuts when linked by their iCloud URL.

Setup

You need to make a config.json in the root. Each service (such as reddit or discord) will have its own object for settings applying to that service, along with a global object that applies to all services. For example:

{
    "global": {
        "enabled": true
    },
    "reddit": {
        "credentials": {
            "clientId": "h4yk4m821",
            "clientSecret": "It's a secret to everybody."
        }
    },
    "discord": {
        "token": "insertyourtokenhere"
	},
	"telegram": {
		"token": "insertyourothertokenhere"
	}
}

Since global.enabled is true, reddit.enabled and discord.enabled are also true. If you set enabled to false for a service, you can not use it.

Usage

After starting the script, you can use it in Reddit and Discord, depending on if the service was properly set up. There are also hosted versions available.

Reddit

Allow the Reddit bot to detect posts by inviting the bot to the moderation team. It only uses the posts permission since it only needs it to sticky its preview comment, but it will work with no moderator permissions. The hosted version is u/ShortcutsPreview.

Link posts with a iCloud URL linking to a shortcut will be previewed, in the form of a possibly-stickied comment.

Discord

The Discord bot needs three permissions to work:

  • Read Messages
  • Send Messages
  • Send Links

You can invite the hosted version with the necessary permissions through this link.

The first iCloud URL found in a message is previewed with an embed message.

Telegram

You can add the hosted bot through this link.

shortcutspreview's People

Contributors

haykam821 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.