Clean & powerful popup Discord widgets for your website.
See the documentation for more options.
<scriptsrc="https://cdn.jsdelivr.net/npm/@widgetbot/crate@3" async>constcrate=newCrate({server: '299881420891881473',channel: '355719584830980096'})crate.notify('Test notification')crate.on('signIn',data=>{console.log(`Guest signed in as ${data.name}`)crate.emit('sendMessage','Hello world')})</script>Pass chat (instead of server / channel) and the shard URL of your
deployed Telegram widget host:
<scriptsrc="https://cdn.jsdelivr.net/npm/@widgetbot/crate@3" async>constcrate=newCrate({chat: '-1003784217881',shard: 'https://your-telegram-widget.example.com',// topic: '12', // supergroup topic, optional})crate.on('ready',()=>console.log('telegram-widget ready'))crate.on('signIn',user=>console.log('signed in as',user))</script>When chat is set, crate switches into Telegram mode: navigation events use
chatId/topicId and the default button color is Telegram blue. shard is
required in Telegram mode — there is no default host.
