XF2 [8WR] Discord Integration

XF2 [8WR] Discord Integration [Paid] 2.1.1.9

No permission to buy ($30.00)
Nevermind - users are still getting that error when signing up.

E: Had to disable the addon because it was giving users that "discord_options" error when they tried to sign up.
 
Nevermind - users are still getting that error when signing up.

E: Had to disable the addon because it was giving users that "discord_options" error when they tried to sign up.

Interesting. I never installed this yet. @Jaxel let me know when the errors are fixed so I can set it up. I've been putting it off for a while. Good thing too. I'll be watching this thread to see when these errors are fixed.
 
Nevermind - users are still getting that error when signing up.

E: Had to disable the addon because it was giving users that "discord_options" error when they tried to sign up.
Uninstall and reinstall. The setup file clearly installs that table column.
 
The sidebar only shows up if you're not using WidgetBot.io. I will add a widget sidebar position for the next version.
 
Thanks.

Btw the XFMG works, so that's pretty cool. But can you support so it shows a thumbnail in the discord post embed? Right now it just says "Tex posted new media: Various weapon concept arts ".
 
I'm looking at the setup file right now...
Code:
    public function upgrade2012Step1()
    {
        $this->schemaManager()->alterTable('xf_user_option', function(Alter $table)
        {
            $table->addColumn('discord_options', 'blob')->nullable();
        });
    }
There's no way it didn't install that column, if you ran the setup. Not to mention it installed on my own forums perfectly fine.
 
Hi @Jaxel , I am getting this error while disabling account preferences for discord integration

Code:
Sunucu hata günlüğü
XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'discord_options' in 'field list' src/XF/Db/AbstractStatement.php:212
Tarafından: XXXXX 2 Haz 2018 22:03'de
Yığın izleme
UPDATE  `xf_user_option` SET `discord_options` = ? WHERE `user_id` = 1
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL statement...', 1054, '42S22')
#1 src/XF/Db/Mysqli/Statement.php(39): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1054, '42S22')
#2 src/XF/Db/Mysqli/Statement.php(54): XF\Db\Mysqli\Statement->prepare()
#3 src/XF/Db/AbstractAdapter.php(79): XF\Db\Mysqli\Statement->execute()
#4 src/XF/Db/AbstractAdapter.php(244): XF\Db\AbstractAdapter->query('UPDATE  `xf_use...', Array)
#5 src/XF/Mvc/Entity/Entity.php(1394): XF\Db\AbstractAdapter->update('xf_user_option', Array, '`user_id` = 1')
#6 src/XF/Mvc/Entity/Entity.php(1121): XF\Mvc\Entity\Entity->_saveToSource()
#7 src/addons/EWR/Discord/Pub/Controller/Account.php(28): XF\Mvc\Entity\Entity->save()
#8 src/XF/Pub/Controller/Account.php(311): EWR\Discord\Pub\Controller\Account->preferencesSaveProcess(Object(XFMG\XF\Entity\User))
#9 src/XF/Mvc/Dispatcher.php(249): XF\Pub\Controller\Account->actionPreferences(Object(XF\Mvc\ParameterBag))
#10 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XF:Account', 'Preferences', 'json', Object(XF\Mvc\ParameterBag), 'account', Object(KL\EditorManager\Pub\Controller\Account), NULL)
#11 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#12 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#13 src/XF.php(328): XF\App->run()
#14 index.php(13): XF::runApp('XF\\Pub\\App')
#15 {main}
Durum isteği
array(4) {
  ["url"] => string(30) "/index.php?account/preferences"
  ["referrer"] => string(50) "https://xxxxx.xxx/index.php?account/preferences"
  ["_GET"] => array(1) {
    ["account/preferences"] => string(0) ""
  }
  ["_POST"] => array(8) {
    ["user"] => array(5) {
      ["style_id"] => string(1) "5"
      ["language_id"] => string(1) "2"
      ["timezone"] => string(13) "Europe/London"
      ["visible"] => string(1) "1"
      ["activity_visible"] => string(1) "1"
    }
    ["option"] => array(4) {
      ["email_on_conversation"] => string(1) "1"
      ["creation_watch_state"] => string(11) "watch_email"
      ["interaction_watch_state"] => string(11) "watch_email"
      ["content_show_signature"] => string(1) "1"
    }
    ["discord_options"] => array(1) {
      ["crate"] => string(1) "1"
    }
    ["alert"] => array(39) {
      ["post_insert"] => string(1) "1"
      ["post_quote"] => string(1) "1"
      ["post_mention"] => string(1) "1"
      ["post_like"] => string(1) "1"
      ["xfmg_media_insert"] => string(1) "1"
      ["xfmg_media_mention"] => string(1) "1"
      ["xfmg_media_like"] => string(1) "1"
      ["xfmg_album_share_view"] => string(1) "1"
      ["xfmg_album_share_add"] => string(1) "1"
      ["xfmg_album_mention"] => string(1) "1"
      ["xfmg_album_like"] => string(1) "1"
      ["xfmg_comment_insert"] => string(1) "1"
      ["xfmg_comment_quote"] => string(1) "1"
      ["xfmg_comment_mention"] => string(1) "1"
      ["xfmg_comment_like"] => string(1) "1"
      ["xfmg_rating_insert"] => string(1) "1"
      ["resource_update_insert"] => string(1) "1"
      ["resource_update_mention"] => string(1) "1"
      ["resource_update_like"] => string(1) "1"
      ["xfa_roster_new_club_request_received"] => string(1) "1"
      ["xfa_roster_revoke_club_membership"] => string(1) "1"
      ["xfa_roster_revoke_roster_membership"] => string(1) "1"
      ["xfa_roster_accept_club_member_request"] => string(1) "1"
      ["xfa_roster_decline_club_member_request"] => string(1) "1"
      ["xfa_roster_invite_user_in_club"] => string(1) "1"
      ["xfa_roster_add_user_in_roster"] => string(1) "1"
      ["xfa_roster_leave_club"] => string(1) "1"
      ["resource_rating_review"] => string(1) "1"
      ["resource_rating_reply"] => string(1) "1"
      ["profile_post_insert"] => string(1) "1"
      ["profile_post_mention"] => string(1) "1"
      ["profile_post_like"] => string(1) "1"
      ["profile_post_comment_your_profile"] => string(1) "1"
      ["profile_post_comment_your_post"] => string(1) "1"
      ["profile_post_comment_other_commenter"] => string(1) "1"
      ["profile_post_comment_like"] => string(1) "1"
      ["conversation_message_like"] => string(1) "1"
      ["user_following"] => string(1) "1"
      ["trophy_award"] => string(1) "1"
    }
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(30) "/index.php?account/preferences"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
I'm having this error too. Uninstalling and reinstalling the addon doesn't fix this.
https://pastebin.com/raw/6cBDVVzX
I did not upgrade the addon from XF1, but rather ended up uninstalling my XF1 add ons before upgrading. (I wasn't sure which ones we'd continue to keep in XF2)
I'm looking at the setup file right now...
Code:
    public function upgrade2012Step1()
    {
        $this->schemaManager()->alterTable('xf_user_option', function(Alter $table)
        {
            $table->addColumn('discord_options', 'blob')->nullable();
        });
    }
There's no way it didn't install that column, if you ran the setup. Not to mention it installed on my own forums perfectly fine.
I also uninstalled and reinstalled it and no luck.
 
The Discord icon is showing on the base xenforo style but not on my custom style from themehouse.com, how do i add it?

1528028838868.webp
 
Anyone having issues with the discord_options column not existing will need to manually add the column...
Code:
ALTER TABLE `xf_user_option` ADD `discord_options` BLOB NULL;
or
Code:
$ php cmd.php xf-addon:upgrade-step EWR/Discord 2012 1
 
i have an error @Jaxel

  • XF\PrintableException: Ha ocurrido un error al conectar con Discord. Por favor, inténtalo más tarde.
  • src/addons/EWR/Discord/Repository/Discord.php:55
  • Generado por: Cuenta desconocida
  • 3/6/18 a las 17:47
Seguimiento
#0 src/addons/EWR/Discord/Repository/Discord.php(81): EWR\Discord\Repository\Discord->getGuild('/members/221365...')
#1 src/addons/EWR/Discord/Repository/Discord.php(189): EWR\Discord\Repository\Discord->patchMember(Object(XFMG\XF\Entity\User), Object(EWR\Discord\Entity\UserConnectedAccount))
#2 src/addons/EWR/Discord/Cron/Sync.php(9): EWR\Discord\Repository\Discord->syncDiscord()
#3 [internal function]: EWR\Discord\Cron\Sync::syncDiscord(Object(XF\Entity\CronEntry))
#4 src/XF/Job/Cron.php(35): call_user_func(Array, Object(XF\Entity\CronEntry))
#5 src/XF/Job/Manager.php(241): XF\Job\Cron->run(8)
#6 src/XF/Job/Manager.php(187): XF\Job\Manager->runJobInternal(Array, 8)
#7 src/XF/Job/Manager.php(76): XF\Job\Manager->runJobEntry(Array, 8)
#8 job.php(15): XF\Job\Manager->runQueue(false, 8)
#9 {main}
Estado de la solicitud
array(4) {
["url"] => string(8) "/job.php"
["referrer"] => string(59) "https://www.comunidad-gamer.com/forums/ps4-games.129/page-9"
["_GET"] => array(0) {
}
["_POST"] => array(0) {
}
}
 
Crate v3 has been released. Options for it will be included in this addon ACP soon perhaps?

"Crate V3.0 It features: - A new API for interacting with WidgetBot
- Integration with the new widget (more features coming soon)
- New animations + faster loading times

All existing installations have been upgraded. Check out the docs over at https://docs.widgetbot.io/#integrations for details on how to use these new APIs

Example:
Code:
<script src="https://unpkg.com/@widgetbot/crate@^3" async>

  const crate = new Crate({ server: '299881420891881473' })

  crate.notify('Test notification')
  crate.on('signIn', data => {
    console.log(`Guest signed in as ${data.name}`)
    crate.emit('sendMessage', 'Hello world')
  })
</script>
"
 
Discord + XFMG bug? I found 8 new errors. They looked to be the same.

I found these after my media items had been auto posted to Discord.

  • InvalidArgumentException: Accessed unknown getter 'tag_line' on XFMG:MediaItem[309]
  • src/XF/Mvc/Entity/Entity.php:182
Code:
Stack trace
#0 src/XF/Mvc/Entity/Entity.php(95): XF\Mvc\Entity\Entity->get('tag_line')
#1 src/addons/EWR/Discord/Entity/XFMGItem.php(34): XF\Mvc\Entity\Entity->__get('tag_line')
#2 src/XF/Mvc/Entity/Entity.php(1145): EWR\Discord\Entity\XFMGItem->_postSave()
#3 src/addons/XFMG/Service/Media/Creator.php(235): XF\Mvc\Entity\Entity->save()
#4 src/XF/Service/ValidateAndSavableTrait.php(40): XFMG\Service\Media\Creator->_save()
#5 src/addons/XFMG/Pub/Controller/Media.php(747): XFMG\Service\Media\Creator->save()
#6 src/XF/Mvc/Dispatcher.php(249): XFMG\Pub\Controller\Media->actionSaveMedia(Object(XF\Mvc\ParameterBag))
#7 src/XF/Mvc/Dispatcher.php(88): XF\Mvc\Dispatcher->dispatchClass('XFMG:Media', 'SaveMedia', 'json', Object(XF\Mvc\ParameterBag), 'xfmg', Object(XFMG\Pub\Controller\Media), NULL)
#8 src/XF/Mvc/Dispatcher.php(41): XF\Mvc\Dispatcher->dispatchLoop(Object(XF\Mvc\RouteMatch))
#9 src/XF/App.php(1931): XF\Mvc\Dispatcher->run()
#10 src/XF.php(328): XF\App->run()
#11 index.php(13): XF::runApp('XF\\Pub\\App')
#12 {main}

Code:
Request state
array(4) {
  ["url"] => string(17) "/media/save-media"
  ["referrer"] => string(63) "https://www.theaocdungeon.com/media/categories/cosmetics.11/add"
  ["_GET"] => array(0) {
  }
  ["_POST"] => array(11) {
    ["attachment_hash"] => string(32) "428ecde72bc2cf9c3f13e842ac68915d"
    ["attachment_hash_combined"] => string(92) "{"type":"xfmg_media","context":{"category_id":11},"hash":"428ecde72bc2cf9c3f13e842ac68915d"}"
    ["media"] => array(6) {
      [5] => array(7) {
        ["title"] => string(14) "Velkor’s Eye"
        ["description"] => string(0) ""
        ["tags"] => string(15) "pre-order packs"
        ["temp_media_id"] => string(1) "5"
        ["media_hash"] => string(32) "e0670049c6d7afc6e0afd75497e30cc0"
        ["media_type"] => string(5) "image"
        ["attachment_id"] => string(3) "502"
      }
      [6] => array(7) {
        ["title"] => string(25) "Threads of Fate (Costume)"
        ["description"] => string(0) ""
        ["tags"] => string(15) "pre-order packs"
        ["temp_media_id"] => string(1) "6"
        ["media_hash"] => string(32) "4a0a83983746cf17200e971dbf8163c3"
        ["media_type"] => string(5) "image"
        ["attachment_id"] => string(3) "503"
      }
      [7] => array(7) {
        ["title"] => string(21) "Shell of the Ancients"
        ["description"] => string(0) ""
        ["tags"] => string(15) "pre-order packs"
        ["temp_media_id"] => string(1) "7"
        ["media_hash"] => string(32) "4c0d4abe130cc8fbb5eeba25ebb348d5"
        ["media_type"] => string(5) "image"
        ["attachment_id"] => string(3) "504"
      }
      [8] => array(7) {
        ["title"] => string(11) "Star Chaser"
        ["description"] => string(0) ""
        ["tags"] => string(15) "pre-order packs"
        ["temp_media_id"] => string(1) "8"
        ["media_hash"] => string(32) "31fd3aec811cd1769db4b7ddd3437de8"
        ["media_type"] => string(5) "image"
        ["attachment_id"] => string(3) "505"
      }
      [9] => array(7) {
        ["title"] => string(20) "Seer of the Infinite"
        ["description"] => string(0) ""
        ["tags"] => string(15) "pre-order packs"
        ["temp_media_id"] => string(1) "9"
        ["media_hash"] => string(32) "1b5b4871c6d3964d69adb0099e2b45c2"
        ["media_type"] => string(5) "image"
        ["attachment_id"] => string(3) "506"
      }
      [10] => array(7) {
        ["title"] => string(19) "Tormentor's Visage "
        ["description"] => string(0) ""
        ["tags"] => string(15) "pre-order packs"
        ["temp_media_id"] => string(2) "10"
        ["media_hash"] => string(32) "ccff9c7865af9dc4921e05ac9e6c2df6"
        ["media_type"] => string(5) "image"
        ["attachment_id"] => string(3) "507"
      }
    }
    ["tokens_select"] => string(15) "pre-order packs"
    ["album"] => array(2) {
      ["title"] => string(20) "June Pre-Order Store"
      ["description"] => string(34) "The cosmetics from the June update"
    }
    ["category_id"] => string(2) "11"
    ["album_id"] => string(1) "0"
    ["_xfToken"] => string(8) "********"
    ["_xfRequestUri"] => string(34) "/media/categories/cosmetics.11/add"
    ["_xfWithData"] => string(1) "1"
    ["_xfResponseType"] => string(4) "json"
  }
}
 
@Jaxel is this going to be fixed? Have the same issue. It broke my fourm for 3 days with no one being able to create and account. i had to disable this plugin as a result. I don't know how to add the column and why is that we have to do it? Can't you code this in and update?

SEVERE GLITCHwoot.webp

The discord options is causing all the problem about the user field.

XF\Db\Exception: MySQL statement prepare error [1054]: Unknown column 'discord_options' in 'field list' src/XF/Db/AbstractStatement.php:212
UPDATE `xf_user_option` SET `discord_options` = ? WHERE `user_id` = 1
------------

#0 src/XF/Db/Mysqli/Statement.php(196): XF\Db\AbstractStatement->getException('MySQL statement...', 1054, '42S22')
#1 src/XF/Db/Mysqli/Statement.php(39): XF\Db\Mysqli\Statement->getException('MySQL statement...', 1054, '42S22')

--------- UPDATE

1528199571183.webp
Figured it out. @Jaxel i only new some of this because i use to build gaming forums back in the day. You know most people are unaware on how to do this. I had to guess for 30 minutes what you were meaning. As a paid product, you should provide a fix or be more responsive on your steps. I had your other plugin (xencarta) break all my pictures and lost every picture in my forum; and then this plugin stop users from registering for 3 days (and that was unknown until i had to chase it). You need to either hire someone or create some ticketing system. Love your stuff, but feel like i'm caught in an endless beta.
 
Last edited:
Great update guys! My users think the Discord crate thing is a great addition. Wondering if there is a way to move it? As it's covering my 'To Top' button.
1528342569685.webp
 
I had your other plugin (xencarta) break all my pictures and lost every picture in my forum; and then this plugin stop users from registering for 3 days (and that was unknown until i had to chase it). You need to either hire someone or create some ticketing system. Love your stuff, but feel like i'm caught in an endless beta.

TBH I'm wondering why he nevers responds to anyone. A bit ridiculous to have half the world asking questions about his add-on and just ignores them... Every time I look in this thread someone new is asking something about it and I haven't seen @Jaxel respond barely any.
 
Top Bottom