Answers for "my code"

0

my code

1import React, { Component } from "react";
2import { Editor, EditorState } from "draft-js";
3
4export default class SimpleStaticToolbarEditor extends Component {
5  state = {
6    editorState: EditorState.createEmpty(),
7  };
8
9  onChange = (editorState) => {
10    this.setState({
11      editorState,
12    });
13  };
14
15  render() {
16    return (
17      <div>
18        <div>
19          <Editor
20            editorState={this.state.editorState}
21            onChange={this.onChange}
22          />
23        </div>
24      </div>
25    );
26  }
27}
Posted by: Guest on July-20-2021
0

my code

const { Client, Intents } = require('discord.js');
const client = new Client({ intents: [Intents.FLAGS.GUILDS] });

client.on('ready', () => {
  console.log(`Logged in as ${client.user.tag}!`);
});

client.on('interactionCreate', async interaction => {
  if (!interaction.isCommand()) return;

  if (interaction.commandName === 'ping') {
    await interaction.reply('Pong!');
  }
});

client.login('token');
Posted by: Guest on August-15-2021

Browse Popular Code Answers by Language