Giter Club home page Giter Club logo

guilded4j's Introduction

Guilded4J

Guilded API wrapper for Java development

Official Guilded server: guilded.gg/Guilded4J-Cafe (or use this)

Getting started with the ping-pong bot

  1. Add G4J as dependency
  2. Start coding
import com.google.common.eventbus.Subscribe;
import vip.floatationdevice.guilded4j.G4JClient;
import vip.floatationdevice.guilded4j.event.ChatMessageCreatedEvent;
import vip.floatationdevice.guilded4j.object.ChatMessage;

public class Main {
  final static G4JClient client = new G4JClient("YOUR TOKEN HERE");

  @Subscribe
  public void onMessage(ChatMessageCreatedEvent event) {
    ChatMessage m = event.getChatMessage();
    if(m.getContent().equals("ping")) { // if someone sends "ping"
      client.getChatMessageManager()    // use the client's chat message manager
            .createChannelMessage(      // send a chat message
                m.getChannelId(),       // send to the channel where "ping" belongs to
                "pong"                  // send "pong"
            );
    }
  }

  public static void main(String[] args) {
    client.registerEventListener(new Main());
    client.connectWebSocket();
  }
}
  1. Compile & have fun :)

Useful resources

NOTE:

  • The Guilded bot API is still in early development. Don't request Guilded4J to add some functions that are not implemented on the Guilded side.

Supported features & Progress:

Chat & messaging

  • Create message - createChannelMessage()
  • Delete message - deleteChannelMessage()
  • Update message - updateChannelMessage()
  • Get message info - getChannelMessage()
  • Get messages - getChannelMessages()
  • Add reaction - addReaction()
  • Remove reaction - removeReaction()

Calendar

  • Create event - createCalendarEvent()
  • Delete event - deleteCalendarEvent()
  • Update event - updateCalendarEvent()
  • Get event info - getCalendarEvent()
  • Get events - getCalendarEvents()
  • Create comment - createCalendarEventComment()
  • Update comment - updateCalendarEventComment()
  • Delete comment - deleteCalendarEventComment()
  • Get comment info - getCalendarEventComment()
  • Get comments - getCalendarEventComments()
  • Create or update RSVP - updateCalendarEventRsvp()
  • Get RSVPs - getCalendarEventRsvps()
  • Delete RSVP - deleteCalendarEventRsvp()
  • Get RSVP info - getCalendarEventRsvp()

Members

  • Get user info - getUser()
  • Update/delete nickname - setMemberNickname()
  • Get member info - getServerMember()
  • Kick server member - kickServerMember()
  • Get member list - getServerMembers()
  • Get member ban info - getServerMemberBan()
  • Ban server member - banServerMember()
  • Unban server member - unbanServerMember()
  • Get member ban list - getServerMemberBans()

Forum

  • Create forum topic - createForumTopic()
  • Update forum topic - updateForumTopic()
  • Delete forum topic - deleteForumTopic()
  • Get forum topic info - getForumTopic()
  • Get forum topic list - getForumTopics()
  • Pin a forum topic - pinForumTopic()
  • Unpin a forum topic - unpinForumTopic()
  • Lock a forum topic - lockForumTopic()
  • Unlock a forum topic - unlockForumTopic()
  • Create a forum topic comment - createForumTopicComment()
  • Update a forum topic comment - updateForumTopicComment()
  • Delete a forum topic comment - deleteForumTopicComment()
  • Get a comment on a forum topic - getForumTopicComment()
  • Get a forum topic's comments - getForumTopicComments()
  • Add reaction - addReaction()
  • Remove reaction - removeReaction()

List

  • Create list item - createListItem()
  • Get list items - getListItems()
  • Get a list item - getListItem()
  • Update list item - updateListItem()
  • Delete list item - deleteListItem()
  • Completed list item - completeListItem()
  • Uncomplted list item - uncompleteListItem()

Document

  • Create document - createDoc()
  • Update document - updateDoc()
  • Delete document - deleteDoc()
  • Get document info - getDoc()
  • Get last 50 updated docs - getChannelDocs()

XP

  • Add XP to user - awardUserXp()
  • Add XP to all users with specified role - awardRoleXp()
  • Set XP of user - setUserXp()

Social links

  • Get member's social link - getSocialLink()

Group membership

  • Add member to group - addGroupMember()
  • Remove member from group - removeGroupMember()

Role membership

  • Get member's role(s) - getMemberRoles()
  • Assign role to member - addRoleMember()
  • Remove role from member - removeRoleMember()

Webhooks

  • Create webhook - createWebhook()
  • Get webhooks - getWebhooks()
  • Update webhook - updateWebhook()
  • Delete webhook - deleteWebhook()
  • Get webhook info - getWebhook()

Channels

  • Create channel - createServerChannel()
  • Update channel - updateServerChannel()
  • Delete channel - deleteServerChannel()
  • Get channel info - getServerChannel()
  • Get channel list - getServerChannels()

Server

  • Get server info - getServer()

Event

  • BotServerMembershipCreatedEvent
  • BotServerMembershipDeletedEvent
  • CalendarEventCreatedEvent
  • CalendarEventDeletedEvent
  • CalendarEventCommentCreatedEvent
  • CalendarEventCommentUpdatedEvent
  • CalendarEventCommentDeletedEvent
  • CalendarEventRsvpDeletedEvent
  • CalendarEventRsvpManyUpdatedEvent
  • CalendarEventRsvpUpdatedEvent
  • CalendarEventUpdatedEvent
  • ChannelMessageReactionCreatedEvent
  • ChannelMessageReactionDeletedEvent
  • ChatMessageCreatedEvent
  • ChatMessageDeletedEvent
  • ChatMessageUpdatedEvent
  • DocCreatedEvent
  • DocDeletedEvent
  • DocUpdatedEvent
  • ForumTopicCreatedEvent
  • ForumTopicDeletedEvent
  • ForumTopicUpdatedEvent
  • ForumTopicCommentCreatedEvent
  • ForumTopicCommentUpdatedEvent
  • ForumTopicCommentDeletedEvent
  • ForumTopicPinnedEvent
  • ForumTopicUnpinnedEvent
  • ForumTopicReactionCreatedEvent
  • ForumTopicReactionDeletedEvent
  • ForumTopicCommentReactionCreatedEvent
  • ForumTopicCommentReactionDeletedEvent
  • ForumTopicLockedEvent
  • ForumTopicUnlockedEvent
  • GuildedWebsocketClosedEvent
  • GuildedWebsocketWelcomeEvent
  • ListItemCompletedEvent
  • ListItemCreatedEvent
  • ListItemDeletedEvent
  • ListItemUncompletedEvent
  • ListItemUpdatedEvent
  • ServerChannelCreatedEvent
  • ServerChannelDeletedEvent
  • ServerChannelUpdatedEvent
  • ServerMemberBannedEvent
  • ServerMemberJoinedEvent
  • ServerMemberRemovedEvent
  • ServerMemberUnbannedEvent
  • ServerMemberUpdatedEvent
  • ServerRolesUpdatedEvent
  • ServerWebhookCreatedEvent
  • ServerWebhookUpdatedEvent
  • ServerXpAddedEvent

guilded4j's People

Contributors

dependabot[bot] avatar mcumbrella avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

guilded4j's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.