Banner Notifications
Welcome to the guide on integrating banner notifications into your webpage. This section will explain how to display dynamic banners triggered by specific Discord commands, easily managed via the API.
Integration Code Overview
Here is the basic script you will need to embed in your HTML to fetch and display banner notifications:
<script>
window.onload = function () {
// This is the username of your Discord Account
// Go to settings > my account > username
const username = "mhuzaifadev";
// Fetch and display the banner
fetch(`https://api.quickalert.me/banner_element`)
.then(response => response.text())
.then(html => {
const bannerArea = document.getElementById('bannerArea');
bannerArea.innerHTML = html;
})
.catch(error => console.error("Error fetching banner:", error));
};
</script>
This script automatically fetches the banner content from the server and inserts it into the designated area on your webpage, identified by bannerArea
.
Commands for Managing Banners
Manage your banners through simple Discord commands which allow for quick updates and removals, ensuring your site's information is always up-to-date.
Command | Description |
---|---|
BANNER ADD [MESSAGE] | Adds a new banner with the specified text |
BANNER DELETE | Removes the current banner from display |
Banner Display Example
Here is what a typical banner might look like on your webpage:
The image above is a placeholder showing where and how the banner will appear on your site, providing a clear, unobtrusive notification space at the top of the page.