Announcements

Here, you'll find key exports for managing weapons. These exports allow you to register and update weapons as needed.


Type

type Announcement = {
    id: number,
    title: string,
    content: string, // stringified JSON
    pinned: boolean,
    author: {
        identifier: string,
        name: string
    }
}

Exports

Search for an Announcement

exports['redutzu-mdt']:SearchAnnouncement(id: number) // AnnouncementType | null

Create a new Announcement

exports['redutzu-mdt']:CreateAnnouncement({ title = 'Title', content = '[{..}]' }, authorSource) -- number (id)

Update a Announcement

-- It returns a boolean (if it was successfully updated)
exports['redutzu-mdt']:UpdateAnnouncement(id, { title = 'New title' }) -- boolean

Delete an Announcement

-- It returns a boolean (if it was successfully deleted)
exports['redutzu-mdt']:DeleteAnnouncement(id: number) // boolean

Last updated