项目作者: widgetbot-io

项目描述 :
Popup Discord widgets for your website ☄️
高级语言: TypeScript
项目地址: git://github.com/widgetbot-io/crate.git
创建时间: 2018-01-16T21:09:44Z
项目社区:https://github.com/widgetbot-io/crate

开源协议:GNU Affero General Public License v3.0

下载


Crate

@widgetbot/crate"">npm version
Docs
@widgetbot/crate"">JSDelivr

Clean & powerful popup Discord widgets for your website.

Demo

Usage

See the documentation for more options.

  1. <script src="https://cdn.jsdelivr.net/npm/@widgetbot/crate@3" async>
  2. const crate = new Crate({
  3. server: '299881420891881473',
  4. channel: '355719584830980096'
  5. })
  6. crate.notify('Test notification')
  7. crate.on('signIn', data => {
  8. console.log(`Guest signed in as ${data.name}`)
  9. crate.emit('sendMessage', 'Hello world')
  10. })
  11. </script>