Socket
Socket
Sign inDemoInstall

fjordd

Package Overview
Dependencies
4
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    fjordd

A basic discord api wrapper


Version published
Weekly downloads
2
decreased by-66.67%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

Fjordd

An incredibly simple discord api for javascript

Installation

npm install fjordd

Example Code

const Client = require('fjordd')

Client.login('BOT TOKEN', ["GUILD_MESSAGES", "GUILDS"])


Client.events.on('messageCreate', async message => {
    if(message.content.toLowerCase().startsWith("!help")){
        Client.messages.send({content: "help"})
        
    } 
})

Client.events.on('ready', () => {
    console.log('Online')
})

Functions

Ready & MessageCreate Events
Client
Login
<Client>.login(token, intents)
Application Info
await <Client>.get()
Start Typing
<Client>.startTyping()

Guilds
Get Guild
await <Client>.guilds.get(guild_id)

Users
Get User
await <Client>.users.get(user_id)

Webhooks
Get Webhooks
await <Client>.webhooks.get(channel_id)

Messages
Get Message
await <Client>.messages.get({channel_id, message_id})
Edit Message
<Client>.messages.edit({content, message_id, channel_id})
Send Message
<Client>.messages.send({content, embeds})
React
<Client>.messages.react(emoji, channel_id, message_id)

Channels
List Channels
await <Client>.channels.all()
Delete Channel
<Client>.channels.delete(channel_id)

FAQs

Last updated on 08 Apr 2024

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc