Dynamic Usernames
In WidgetBot v3, we've added a long-requested feature: Dynamic Usernames! This means that you can automatically set the widget username to a user's website username, and they'll be able to immediately chat. This is useful for websites such as forums where the site has its own login system.
ℹ️ You must enable guests to use dynamic usernames. You can do so with the /guestmode
command.
You can easily incorporate dynamic usernames no matter how you integrate WidgetBot:
Crate
Add the username
option:
<script src="https://cdn.jsdelivr.net/npm/@widgetbot/crate@3" async defer>
new Crate({
server: '299881420891881473',
channel: '355719584830980096',
username: 'example user'
})
</script>
html-embed
Add the username
option:
<widgetbot
server="299881420891881473"
channel="355719584830980096"
username="example user"
width="800"
height="600"
></widgetbot>
<script src="https://cdn.jsdelivr.net/npm/@widgetbot/html-embed"></script>
react-embed
Add the username
prop:
<WidgetBot
server="299881420891881473"
channel="355719584830980096"
username="example user"
/>
(you must be using react-embed v1.4.0 or higher.)
iframe
Add the username
query param:
<iframe src="https://e.widgetbot.io/channels/299881420891881473/355719584830980096?username=example%20user" height="600" width="800"></iframe>