Move to a cluster
Discord now requires us to use sharding - something that will need to be worked on. WidgetBot may display "unable to locate this server" to some users, randomly. This will be fixed soon.
In the meantime, we'd recommend all users to use one of the clusters
Alternatively, if you want beta features such as letting guests mention users and use custom emotes, use the beta version. Note that this may have bugs.
Note
There is no difference between clusters 1 through 5.
How can I use a cluster?¶
First, click on the link for a cluster and add the bot to your server.
Note
The examples on this page use Cluster 1 (cl1), change it to the cluster you added to the server.
Jump to¶
iframes¶
Preprend the cluster to the domain in the src url, for example https://widgetbot.io/channels/34234/234432 => https://cl4.widgetbot.io/channels/34234/234432.
iframe example with cluster
<iframe src="https://cl1.widgetbot.io/channels/299881420891881473/355719584830980096" height="600" width="800"></iframe>
For more info see the iframe tutorial (the cluster is the shard).
Crate¶
Set the shard option:
Crate example with cluster
<script src="https://cdn.jsdelivr.net/npm/@widgetbot/crate@3" async defer> new Crate({ server: '299881420891881473', channel: '355719584830980096', shard: 'https://cl1.widgetbot.io' }) </script>
For more info see the Crate tutorial.
html-embed¶
Add a shard attribute
html-embed example with cluster
<widgetbot server="299881420891881473" channel="355719584830980096" width="800" height="600" shard="https://cl1.widgetbot.io" ></widgetbot> <script src="https://cdn.jsdelivr.net/npm/@widgetbot/html-embed"></script>
For more info see the html-embed tutorial.
react-embed¶
Set the shard prop
react-embed example with cluster
import * as React from 'react' import WidgetBot from '@widgetbot/react-embed' const App = () => ( <WidgetBot server="299881420891881473" channel="355719584830980096" shard="https://cl1.widgetbot.io" /> ) export default App